-\'optimize\'
authorChristian Grothoff <christian@grothoff.org>
Wed, 27 Jun 2012 10:22:13 +0000 (10:22 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 27 Jun 2012 10:22:13 +0000 (10:22 +0000)
src/util/common_allocation.c

index 801eeeebc349216ca92441e25e371645c6bbd300..c86185685ddbf74aeb5b76ada7f0c4abd4d30fca 100644 (file)
@@ -251,7 +251,7 @@ GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
   len = GNUNET_MIN (len, strlen (str));
   res = GNUNET_xmalloc_ (len + 1, filename, linenumber);
   memcpy (res, str, len);
-  res[len] = '\0';
+  /* res[len] = '\0'; 'malloc' zeros out anyway */
   return res;
 }