projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
220fbc2
)
-\'optimize\'
author
Christian Grothoff
<christian@grothoff.org>
Wed, 27 Jun 2012 10:22:13 +0000
(10:22 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 27 Jun 2012 10:22:13 +0000
(10:22 +0000)
src/util/common_allocation.c
patch
|
blob
|
history
diff --git
a/src/util/common_allocation.c
b/src/util/common_allocation.c
index 801eeeebc349216ca92441e25e371645c6bbd300..c86185685ddbf74aeb5b76ada7f0c4abd4d30fca 100644
(file)
--- a/
src/util/common_allocation.c
+++ b/
src/util/common_allocation.c
@@
-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;
}