[openib-general] [PATCH 08/14] IB/mthca: Fix memset size

Roland Dreier roland at topspin.com
Thu Jun 23 21:04:20 PDT 2005


Fix memset to use sizeof *props instead of just sizeof props.

Signed-off-by: Roland Dreier <roland at topspin.com>

---

 linux.git/drivers/infiniband/hw/mthca/mthca_provider.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)



--- linux.git.orig/drivers/infiniband/hw/mthca/mthca_provider.c	2005-06-23 13:03:02.629547920 -0700
+++ linux.git/drivers/infiniband/hw/mthca/mthca_provider.c	2005-06-23 13:03:06.413728929 -0700
@@ -53,7 +53,7 @@ static int mthca_query_device(struct ib_
 	if (!in_mad || !out_mad)
 		goto out;
 
-	memset(props, 0, sizeof props);
+	memset(props, 0, sizeof *props);
 
 	props->fw_ver              = mdev->fw_ver;
 




More information about the general mailing list