projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop h and hh length modifiers from printf format strings.
[tinc]
/
src
/
xmalloc.c
diff --git
a/src/xmalloc.c
b/src/xmalloc.c
index
a687433
..
39dc03c
100644
(file)
--- a/
src/xmalloc.c
+++ b/
src/xmalloc.c
@@
-113,9
+113,12
@@
char *xstrdup(const char *s)
{
char *p;
{
char *p;
+ if(!s)
+ return NULL;
+
p = strdup(s);
if(!p)
p = strdup(s);
if(!p)
- xalloc_fail (
s ? (int)strlen(s) : 0
);
+ xalloc_fail (
(int)strlen(s)
);
return p;
}
return p;
}