From: Ivo Timmermans Date: Wed, 29 Nov 2000 14:23:08 +0000 (+0000) Subject: xstrdup now takes a const pointer as an argument. X-Git-Tag: import-tinc-1.1~785^2~653 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=8ea23d9ec3f2fe0c113eac5caafb7c2bd03f3016;p=meshlink xstrdup now takes a const pointer as an argument. --- diff --git a/lib/xalloc.h b/lib/xalloc.h index 3579efce..caf0f37d 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -23,4 +23,4 @@ void *xmalloc_and_zero PARAMS ((size_t n)); void *xcalloc PARAMS ((size_t n, size_t s)); void *xrealloc PARAMS ((void *p, size_t n)); -char *xstrdup PARAMS ((char *s)); +char *xstrdup PARAMS ((const char *s)); diff --git a/lib/xmalloc.c b/lib/xmalloc.c index e86fb070..e1ab3140 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -127,7 +127,7 @@ xrealloc (p, n) /* Duplicate a string */ -char *xstrdup(char *s) +char *xstrdup(const char *s) { char *p;