A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change MSG_file_unlink() return type
[simgrid.git]
/
include
/
smpi
/
smpi_cocci.h
diff --git
a/include/smpi/smpi_cocci.h
b/include/smpi/smpi_cocci.h
index 8243e7ac3eedc528ed39b3d0d7a6e163af4c18f9..c4ea46fdbf60e3d997645293a68e953e42fd3273 100644
(file)
--- a/
include/smpi/smpi_cocci.h
+++ b/
include/smpi/smpi_cocci.h
@@
-15,7
+15,7
@@
type *name = NULL; \
static void __attribute__((constructor)) __preinit_##name(void) { \
if(!name) \
type *name = NULL; \
static void __attribute__((constructor)) __preinit_##name(void) { \
if(!name) \
- name = (type*)
malloc(smpi_global_size() * sizeof(type));
\
+ name = (type*)
calloc(smpi_global_size(), sizeof(type));
\
} \
static void __attribute__((destructor)) __postfini_##name(void) { \
free(name); \
} \
static void __attribute__((destructor)) __postfini_##name(void) { \
free(name); \
@@
-55,7
+55,7
@@
XBT_PUBLIC(void) smpi_free_static(void);
#define SMPI_VARINIT_STATIC(name,type) \
static type *name = NULL; \
if(!name) { \
#define SMPI_VARINIT_STATIC(name,type) \
static type *name = NULL; \
if(!name) { \
- name = (type*)
malloc(smpi_global_size() * sizeof(type));
\
+ name = (type*)
calloc(smpi_global_size(), sizeof(type));
\
smpi_register_static(name, xbt_free); \
}
smpi_register_static(name, xbt_free); \
}