mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Don't test arrays for being NULL.
MFC after: 1 month
This commit is contained in:
parent
2030b2943b
commit
c5985c1f9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256838
@ -797,8 +797,6 @@ char *
|
||||
emulname(KINFO *k, VARENT *ve __unused)
|
||||
{
|
||||
|
||||
if (k->ki_p->ki_emul == NULL)
|
||||
return (NULL);
|
||||
return (strdup(k->ki_p->ki_emul));
|
||||
}
|
||||
|
||||
@ -827,7 +825,6 @@ label(KINFO *k, VARENT *ve __unused)
|
||||
char *
|
||||
loginclass(KINFO *k, VARENT *ve __unused)
|
||||
{
|
||||
char *s;
|
||||
|
||||
/*
|
||||
* Don't display login class for system processes;
|
||||
@ -837,8 +834,5 @@ loginclass(KINFO *k, VARENT *ve __unused)
|
||||
if (k->ki_p->ki_flag & P_SYSTEM) {
|
||||
return (strdup("-"));
|
||||
}
|
||||
s = k->ki_p->ki_loginclass;
|
||||
if (s == NULL)
|
||||
return (NULL);
|
||||
return (strdup(s));
|
||||
return (strdup(k->ki_p->ki_loginclass));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user