Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Redundant parentheses.
[simgrid.git] / src / xbt / mmalloc / mm_module.c
index ebf8494..cd4d7b7 100644 (file)
@@ -37,7 +37,7 @@
 #endif
 #include "mmprivate.h"
 #include "xbt/ex.h"
-#include "src/xbt_modinter.h" /* declarations of mmalloc_preinit and friends that live here */
+#include "xbt/xbt_modinter.h" /* declarations of mmalloc_preinit and friends that live here */
 
 #ifndef SEEK_SET
 #define SEEK_SET 0
@@ -93,7 +93,7 @@ xbt_mheap_t xbt_mheap_new_options(int fd, void *baseaddr, int options)
 
   if (fd >= 0) {
     if (fstat(fd, &sbuf) < 0)
-      return (NULL);
+      return NULL;
 
     else if (sbuf.st_size > 0) {
       /* We were given a valid file descriptor on an open file, so try to remap
@@ -159,7 +159,7 @@ xbt_mheap_t xbt_mheap_new_options(int fd, void *baseaddr, int options)
 
   /* NULL is not a valid baseaddr as we cannot map anything there. C'mon, user. Think! */
   if (baseaddr == NULL)
-    return (NULL);
+    return NULL;
 
   /* We start off with the malloc descriptor allocated on the stack, until we build it up enough to
    * call _mmalloc_mmap_morecore() to allocate the first page of the region and copy it there.  Ensure that it is
@@ -265,7 +265,7 @@ void *xbt_mheap_destroy(xbt_mheap_t mdp)
     }
   }
 
-  return (mdp);
+  return mdp;
 }
 
 /* Safety gap from the heap's break address.
@@ -310,7 +310,7 @@ static void mmalloc_fork_child(void)
 }
 
 /* Initialize the default malloc descriptor. */
-void *mmalloc_preinit(void)
+xbt_mheap_t mmalloc_preinit(void)
 {
   if (__mmalloc_default_mdp == NULL) {
     if(!xbt_pagesize)