mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-12 15:59:24 -06:00
Merge branch 'js/nedmalloc-gcc6-warnings'
Squelch compiler warnings for netmalloc (in compat/) library. * js/nedmalloc-gcc6-warnings: nedmalloc: work around overzealous GCC 6 warning nedmalloc: fix misleading indentation
This commit is contained in:
commit
ffdcac4bc5
@ -955,12 +955,11 @@ void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void **
|
||||
*/
|
||||
char *strdup(const char *s1)
|
||||
{
|
||||
char *s2 = 0;
|
||||
if (s1) {
|
||||
size_t len = strlen(s1) + 1;
|
||||
s2 = malloc(len);
|
||||
char *s2 = malloc(len);
|
||||
|
||||
if (s2)
|
||||
memcpy(s2, s1, len);
|
||||
}
|
||||
return s2;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user