From: Christophe ThiƩry Date: Fri, 28 Oct 2011 10:11:00 +0000 (+0200) Subject: Don't memset to zero X-Git-Tag: exp_20120216~540^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d8d4e03ef0522097adb78ee606e5f9cc489c0d29 Don't memset to zero --- diff --git a/src/bindings/lua/lua_utils.c b/src/bindings/lua/lua_utils.c index 84b8ca2799..3f1f523f0a 100644 --- a/src/bindings/lua/lua_utils.c +++ b/src/bindings/lua/lua_utils.c @@ -103,7 +103,9 @@ const char* sglua_get_spaces(int length) { static char spaces[128]; xbt_assert(length < 128); - memset(spaces, ' ', length); + if (length != 0) { + memset(spaces, ' ', length); + } spaces[length] = '\0'; return spaces; }