top(1): Fix Coverity warning
Don't call strerror on negative errnos Reported by: Coverity CID: 976708 Reviewed by: eadler Differential Revision: https://reviews.freebsd.org/D15909
This commit is contained in:
parent
1ef447f923
commit
aa9d9bfa90
@ -242,7 +242,7 @@ err_string(void)
|
||||
errp = &(errs[cnt++]);
|
||||
if (errp->errnum != currerr)
|
||||
{
|
||||
if (currerr != -1)
|
||||
if (currerr >= 0)
|
||||
{
|
||||
if ((stringlen = str_adderr(string, stringlen, currerr)) < 2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user