projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Andreas Krennmair:
[apps/madmutt.git]
/
strdup.c
diff --git
a/strdup.c
b/strdup.c
index
0249a05
..
a240d82
100644
(file)
--- a/
strdup.c
+++ b/
strdup.c
@@
-3,17
+3,16
@@
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
-char *strdup (const char *s)
/* __MEM_CHECKED__ */
-{
+char *strdup (const char *s)
+{
/* __MEM_CHECKED__ */
char *d;
char *d;
-
+
if (s == NULL)
return NULL;
if (s == NULL)
return NULL;
-
- if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */
+
+ if ((d = malloc (strlen (s) + 1)) == NULL)
/* __MEM_CHECKED__ */
return NULL;
memcpy (d, s, strlen (s) + 1);
return d;
}
return NULL;
memcpy (d, s, strlen (s) + 1);
return d;
}
-