Silence an OpenBSD linker warning
Alpine 3.19 Success Details

This commit is contained in:
Přemysl Eric Janouch 2024-04-10 17:54:34 +02:00
parent f04cc2c61e
commit 8386af0420
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,8 @@ xreallocarray (void *o, size_t n, size_t m)
static char *
xstrdup (const char *s)
{
return strcpy (xmalloc (strlen (s) + 1), s);
size_t len = strlen (s) + 1;
return memcpy (xmalloc (len), s, len);
}
static char *