Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix #8852 (SimGrid won't compile on Ubuntu 9.10) by betterly checking my argum...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 28 Oct 2009 22:17:55 +0000 (22:17 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 28 Oct 2009 22:17:55 +0000 (22:17 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6817 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Msg/gras_msg_exchange.c
src/gras/Msg/rpc.c
src/xbt/cunit.c

index 79bd73c..c4a2339 100644 (file)
@@ -86,7 +86,7 @@ gras_msg_wait_ext_(double timeout,
   restart_receive:             /* Goto here when the receive of a message failed */
     need_restart = 0;
     now = gras_os_time();
-    memset(&msg, sizeof(msg), 0);
+    memset(&msg, 0, sizeof(msg));
 
     TRY {
       xbt_queue_shift_timed(pd->msg_received, &msg,
index 8f59435..86c5788 100644 (file)
@@ -112,7 +112,7 @@ void gras_msg_ctx_mallocator_free_f(void *ctx)
 
 void gras_msg_ctx_mallocator_reset_f(void *ctx)
 {
-  memset(ctx, sizeof(s_gras_msg_cb_ctx_t), 0);
+  memset(ctx, 0, sizeof(s_gras_msg_cb_ctx_t));
 }
 
 /** @brief Launch a RPC call, but do not block for the answer */
index 15d6afa..57a988c 100644 (file)
@@ -284,7 +284,7 @@ static int xbt_test_suite_run(xbt_test_suite_t suite)
     sprintf(suite_title + 40 - (suite_len + 4) / 2, "[ %s ]", suite->title);
     suite_title[40 + (suite_len + 5) / 2] = '=';
     if (!suite->enabled)
-      sprintf(suite_title + 70, " DISABLED ");
+      snprintf(suite_title + 70, 11, " DISABLED ");
     fprintf(stderr, "\n%s\n", suite_title);
   }