projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
strdup.c
diff --git
a/strdup.c
b/strdup.c
index
a240d82
..
9920a4a
100644
(file)
--- a/
strdup.c
+++ b/
strdup.c
@@
-1,3
+1,12
@@
+/*
+ * Copyright notice from original mutt:
+ * [none]
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
/* ultrix doesn't have strdup */
#include <string.h>
/* ultrix doesn't have strdup */
#include <string.h>
@@
-10,9
+19,9
@@
char *strdup (const char *s)
if (s == NULL)
return NULL;
if (s == NULL)
return NULL;
- if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */
+ if ((d = malloc (str
_
len (s) + 1)) == NULL) /* __MEM_CHECKED__ */
return NULL;
return NULL;
- memcpy (d, s, strlen (s) + 1);
+ memcpy (d, s, str
_
len (s) + 1);
return d;
}
return d;
}