1
0
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:
Edward Tomasz Napierala 2013-10-21 09:12:04 +00:00
parent 2030b2943b
commit c5985c1f9f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256838

View File

@ -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));
}