Don't test arrays for being NULL.
MFC after: 1 month
This commit is contained in:
parent
6fe8205051
commit
6d8fb50c15
@ -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 @@ out:
|
||||
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…
x
Reference in New Issue
Block a user