diff options
-rw-r--r-- | libq/xstrdup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libq/xstrdup.c b/libq/xstrdup.c index 6924d21..e069c9d 100644 --- a/libq/xstrdup.c +++ b/libq/xstrdup.c @@ -29,16 +29,16 @@ static char *xstrdup(const char *s) { - char *t; + void *t; if (s == NULL) return NULL; - t = strdup(s); + t = (void *)strdup(s); if (unlikely(t == NULL)) err("Out of memory"); - return t; + return (char *)t; } static char *xstrdup_len(const char *s, size_t *len) |