mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
commit
340ba19098
|
@ -985,10 +985,7 @@ static char *xstrdup(const char *restrict s)
|
|||
{
|
||||
size_t len = xstrlen(s) + 1;
|
||||
char *ptr = malloc(len);
|
||||
|
||||
if (ptr)
|
||||
xstrsncpy(ptr, s, len);
|
||||
return ptr;
|
||||
return ptr ? memcpy(ptr, s, len) : NULL;
|
||||
}
|
||||
|
||||
static bool is_suffix(const char *restrict str, const char *restrict suffix)
|
||||
|
|
Loading…
Reference in a new issue