mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Returning NULL here if malloc(3) fails is silly, at this point in the codepath
we have't malloc(3)'d nearly as much as we probably will, so errx(3) away, instead of waiting for something to fail yet again later on.
This commit is contained in:
parent
86f54b9fb8
commit
05051e2898
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ fmt_argv(char **argv, char *cmd, size_t maxlen)
|
|||
}
|
||||
cp = malloc(len);
|
||||
if (cp == NULL)
|
||||
return (NULL);
|
||||
errx(1, "malloc failed");
|
||||
if (ap == NULL)
|
||||
sprintf(cp, " (%.*s)", (int)maxlen, cmd);
|
||||
else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue