From eb90d05d85d2d8871e8f44a9362068158fc4b2fd Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 17 Dec 2010 09:22:44 +0000 Subject: [PATCH] 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 --- include/xbt/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1