X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=strdup.c;h=79c26c5df5f2eea5f2dafb9541692fe1f64082e5;hp=a240d8265db87cfdd375b70c649232b8a15d7b0e;hb=f32d447febdeb78039cd0da3ad91348f20dec721;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/strdup.c b/strdup.c index a240d82..79c26c5 100644 --- 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 @@ -10,9 +19,9 @@ char *strdup (const char *s) if (s == NULL) return NULL; - if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */ + if ((d = malloc (mutt_strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */ return NULL; - memcpy (d, s, strlen (s) + 1); + memcpy (d, s, mutt_strlen (s) + 1); return d; }