From: mquinson Date: Fri, 17 Dec 2010 09:22:44 +0000 (+0000) Subject: this line is not only UGLY, but it exists a path where it could be dangerous. Good... X-Git-Tag: v3.6_beta2~639 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/eb90d05d85d2d8871e8f44a9362068158fc4b2fd?hp=2962728bd209eccccc780d928aa30545fe0e5d49 this line is not only UGLY, but it exists a path where it could be dangerous. Good catch cppcheck git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9284 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index a04add704d..33aefed2a4 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -101,7 +101,7 @@ void *xbt_malloc0(size_t n) static inline __attribute__ ((always_inline)) void *xbt_realloc(void *p, size_t s) { - void *res = res; + void *res = NULL; //if (s==0) xbt_die("realloc(0) is not portable"); if (s) { if (p) {