ok martin
This commit is contained in:
rin 2016-11-28 08:18:27 +00:00
parent b8a0fa35f1
commit 078edf9ccc

View File

@ -1,4 +1,4 @@
/* $NetBSD: ps.c,v 1.84 2016/09/05 01:00:07 sevan Exp $ */ /* $NetBSD: ps.c,v 1.85 2016/11/28 08:18:27 rin Exp $ */
/* /*
* Copyright (c) 2000-2008 The NetBSD Foundation, Inc. * Copyright (c) 2000-2008 The NetBSD Foundation, Inc.
@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\
#if 0 #if 0
static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94";
#else #else
__RCSID("$NetBSD: ps.c,v 1.84 2016/09/05 01:00:07 sevan Exp $"); __RCSID("$NetBSD: ps.c,v 1.85 2016/11/28 08:18:27 rin Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -261,8 +261,7 @@ main(int argc, char *argv[])
break; /* no-op - was dontuseprocfs */ break; /* no-op - was dontuseprocfs */
case 'L': case 'L':
showkey(); showkey();
exit(0); return 0;
/* NOTREACHED */
case 'l': case 'l':
parsefmt(lfmt); parsefmt(lfmt);
fmt = 1; fmt = 1;
@ -387,7 +386,7 @@ main(int argc, char *argv[])
} else } else
kd = kvm_openfiles(nlistf, memf, swapf, O_RDONLY, errbuf); kd = kvm_openfiles(nlistf, memf, swapf, O_RDONLY, errbuf);
if (kd == 0) if (kd == NULL)
errx(1, "%s", errbuf); errx(1, "%s", errbuf);
if (!fmt) if (!fmt)
@ -413,7 +412,7 @@ main(int argc, char *argv[])
err(1, "%s", kvm_geterr(kd)); err(1, "%s", kvm_geterr(kd));
if (nentries == 0) { if (nentries == 0) {
printheader(); printheader();
exit(1); return 1;
} }
/* /*
* sort proc list * sort proc list
@ -499,8 +498,7 @@ main(int argc, char *argv[])
} }
} }
} }
exit(eval); return eval;
/* NOTREACHED */
} }
static struct kinfo_lwp * static struct kinfo_lwp *
@ -561,7 +559,6 @@ pick_representative_lwp(struct kinfo_proc2 *ki, struct kinfo_lwp *kl, int nlwps)
return kl; return kl;
} }
static struct kinfo_proc2 * static struct kinfo_proc2 *
getkinfo_kvm(kvm_t *kdp, int what, int flag, int *nentriesp) getkinfo_kvm(kvm_t *kdp, int what, int flag, int *nentriesp)
{ {