diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lib.c | 4 | ||||
-rw-r--r-- | lib/lib.h | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -106,7 +106,7 @@ void *xrealloc(void *ptr, size_t size) } // Die unless we can allocate a copy of this many bytes of string. -void *xstrndup(char *s, size_t n) +char *xstrndup(char *s, size_t n) { char *ret = xmalloc(++n); strncpy(ret, s, n); @@ -116,7 +116,7 @@ void *xstrndup(char *s, size_t n) } // Die unless we can allocate a copy of this string. -void *xstrdup(char *s) +char *xstrdup(char *s) { return xstrndup(s, strlen(s)); } @@ -54,8 +54,8 @@ void perror_exit(char *msg, ...) noreturn; void *xmalloc(size_t size); void *xzalloc(size_t size); void *xrealloc(void *ptr, size_t size); -void *xstrndup(char *s, size_t n); -void *xstrdup(char *s); +char *xstrndup(char *s, size_t n); +char *xstrdup(char *s); char *xmsprintf(char *format, ...); void xprintf(char *format, ...); void xputs(char *s); |