[mvapich-discuss] [patch] typo in memset

Patrick Marchand Latifi patrick.latifi at qlogic.com
Fri Oct 26 13:35:15 EDT 2007


Hi,

The following patch fixes what appears to be a typo in memset.  I
noticed this bug while working with mvapich-0.9.9.  The patch should
apply cleanly against the trunk.

Please let me know if I'm wrong.

Take care,

-pat

Index: mpid/vapi/viainit.c
===================================================================
--- mpid/vapi/viainit.c	(revision 1612)
+++ mpid/vapi/viainit.c	(working copy)
@@ -453,7 +453,7 @@
     viadev.array_recv_desc = (VAPI_rr_desc_t *) 
         malloc(sizeof(VAPI_rr_desc_t) * viadev_rq_size);
 
-    memset(viadev.array_recv_desc, '0', sizeof(VAPI_rr_desc_t) * viadev_rq_size);
+    memset(viadev.array_recv_desc, 0, sizeof(VAPI_rr_desc_t) * viadev_rq_size);
     
 #ifdef MCST_SUPPORT
 
Index: mpid/ch_gen2/viainit.c
===================================================================
--- mpid/ch_gen2/viainit.c	(revision 1612)
+++ mpid/ch_gen2/viainit.c	(working copy)
@@ -578,7 +578,7 @@
     viadev.array_recv_desc = (struct ibv_recv_wr *)
         malloc(sizeof(struct ibv_recv_wr) * viadev_rq_size);
 
-    memset(viadev.array_recv_desc, '0',
+    memset(viadev.array_recv_desc, 0,
            sizeof(struct ibv_recv_wr) * viadev_rq_size);
 
     if (viadev_use_on_demand) /*ON_DEMAND*/


More information about the mvapich-discuss mailing list