2007-10-05 Ulrich Drepper <drepper@redhat.com>
+ [BZ #5113]
+ * string/bits/string2.h (__strdup): Cast parameters to calloc to
+ avoid warning with -Wconversion.
+ (__strndup): Likewise.
+ Patch to 50% by Christian Iseli <christian.iseli@licr.org>.
+
[BZ #5112]
* nscd/connections.c (restart): Don't resync if database is
disabled. Patch mostly by Brian De Wolf <bldewolf@csupomona.edu>.
# define __strdup(s) \
(__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \
? (((__const char *) (s))[0] == '\0' \
- ? (char *) calloc (1, 1) \
+ ? (char *) calloc ((size_t) 1, (size_t) 1) \
: ({ size_t __len = strlen (s) + 1; \
char *__retval = (char *) malloc (__len); \
if (__retval != NULL) \
# define __strndup(s, n) \
(__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \
? (((__const char *) (s))[0] == '\0' \
- ? (char *) calloc (1, 1) \
+ ? (char *) calloc ((size_t) 1, (size_t) 1) \
: ({ size_t __len = strlen (s) + 1; \
size_t __n = (n); \
char *__retval; \