Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement reentrant mutexes in xbt_os_thread
[simgrid.git] / src / xbt / mmalloc / mcalloc.c
index 92f7eb1..f80953f 100644 (file)
@@ -7,22 +7,20 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <sys/types.h>  /* GCC on HP/UX needs this before string.h. */
-#include <string.h>    /* Prototypes for memcpy, memmove, memset, etc */
+#include <sys/types.h>          /* GCC on HP/UX needs this before string.h. */
+#include <string.h>             /* Prototypes for memcpy, memmove, memset, etc */
 
 #include "mmprivate.h"
 
 /* Allocate an array of NMEMB elements each SIZE bytes long.
    The entire array is initialized to zeros.  */
 
-void *
-mcalloc (void *md, register size_t nmemb, register size_t size)
+void *mcalloc(void *md, register size_t nmemb, register size_t size)
 {
-  register voidresult;
+  register void *result;
 
-  if ((result = mmalloc (md, nmemb * size)) != NULL)
-    {
-      memset (result, 0, nmemb * size);
-    }
+  if ((result = mmalloc(md, nmemb * size)) != NULL) {
+    memset(result, 0, nmemb * size);
+  }
   return (result);
 }