X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2bc96c63a2cdfac701be8224bf30527aceb25c61..c9e14224862bdfbb1c7cfc4b96748aa23872df1b:/include/xbt/sysdep.h diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index 90be945c57..4b901a3592 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -2,7 +2,7 @@ /* no system header should be loaded out of this file so that we have only */ /* one file to check when porting to another OS */ -/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2004-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,16 +11,16 @@ #ifndef _XBT_SYSDEP_H #define _XBT_SYSDEP_H -#include -#include -#include /* va_list */ - #include "xbt/log.h" #include "xbt/misc.h" #include "xbt/asserts.h" #include "simgrid_config.h" +#include +#include +#include /* va_list */ + SG_BEGIN_DECL() /* They live in asserts.h, but need to be declared before this module. @@ -31,7 +31,7 @@ SG_BEGIN_DECL() * @{ */ /** @brief Kill the program in silence */ -#define xbt_abort() abort() +XBT_PUBLIC(void) xbt_abort(void) _XBT_GNUC_NORETURN; /** * @brief Kill the program with an error message @@ -128,9 +128,7 @@ void *xbt_realloc(void *p, size_t s) res = xbt_malloc(s); } } else { - if (p) { - free(p); - } + free(p); } return res; }