aboutsummaryrefslogtreecommitdiff
path: root/string/string.h
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-04-02 07:17:45 +0000
committerAndreas Jaeger <aj@suse.de>2001-04-02 07:17:45 +0000
commit8c8f37042c52eb0f14f28433ebadbd77ed58b853 (patch)
tree08c590392f20ec30afde7894cebb3ff3611802df /string/string.h
parent8a0746ae74914cbdf02fc609e15d267692695792 (diff)
downloadglibc-8c8f37042c52eb0f14f28433ebadbd77ed58b853.zip
glibc-8c8f37042c52eb0f14f28433ebadbd77ed58b853.tar.gz
glibc-8c8f37042c52eb0f14f28433ebadbd77ed58b853.tar.bz2
* string/string.h (strndupa): Add cast for C++ conformance.
(strdupa): Likewise. Fixes PR libc/2173, reported by tbrowder@home.com.
Diffstat (limited to 'string/string.h')
-rw-r--r--string/string.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/string/string.h b/string/string.h
index 6aee6e1..65769e9 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); \
}))