diff options
author | Andreas Jaeger <aj@suse.de> | 2001-04-02 07:17:45 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2001-04-02 07:17:45 +0000 |
commit | 8c8f37042c52eb0f14f28433ebadbd77ed58b853 (patch) | |
tree | 08c590392f20ec30afde7894cebb3ff3611802df /string | |
parent | 8a0746ae74914cbdf02fc609e15d267692695792 (diff) |
* string/string.h (strndupa): Add cast for C++ conformance.
(strdupa): Likewise.
Fixes PR libc/2173, reported by tbrowder@home.com.
Diffstat (limited to 'string')
-rw-r--r-- | string/string.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/string/string.h b/string/string.h index 6aee6e12ea..65769e9f12 100644 --- a/string/string.h +++ b/string/string.h @@ -135,7 +135,7 @@ extern char *strndup (__const char *__string, size_t __n) ({ \ __const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ - char *__new = __builtin_alloca (__len); \ + char *__new = (char *) __builtin_alloca (__len); \ (char *) memcpy (__new, __old, __len); \ })) @@ -145,7 +145,7 @@ extern char *strndup (__const char *__string, size_t __n) ({ \ __const char *__old = (s); \ size_t __len = strnlen (__old, (n)); \ - char *__new = __builtin_alloca (__len + 1); \ + char *__new = (char *) __builtin_alloca (__len + 1); \ __new[__len] = '\0'; \ (char *) memcpy (__new, __old, __len); \ })) |