Module Name: src Committed By: rin Date: Mon Nov 28 08:18:27 UTC 2016
Modified Files: src/bin/ps: ps.c Log Message: KNF ok martin To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/bin/ps/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/ps/ps.c diff -u src/bin/ps/ps.c:1.84 src/bin/ps/ps.c:1.85 --- src/bin/ps/ps.c:1.84 Mon Sep 5 01:00:07 2016 +++ src/bin/ps/ps.c Mon Nov 28 08:18:27 2016 @@ -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. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #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 /* not lint */ @@ -261,8 +261,7 @@ main(int argc, char *argv[]) break; /* no-op - was dontuseprocfs */ case 'L': showkey(); - exit(0); - /* NOTREACHED */ + return 0; case 'l': parsefmt(lfmt); fmt = 1; @@ -387,7 +386,7 @@ main(int argc, char *argv[]) } else kd = kvm_openfiles(nlistf, memf, swapf, O_RDONLY, errbuf); - if (kd == 0) + if (kd == NULL) errx(1, "%s", errbuf); if (!fmt) @@ -413,7 +412,7 @@ main(int argc, char *argv[]) err(1, "%s", kvm_geterr(kd)); if (nentries == 0) { printheader(); - exit(1); + return 1; } /* * sort proc list @@ -499,8 +498,7 @@ main(int argc, char *argv[]) } } } - exit(eval); - /* NOTREACHED */ + return eval; } static struct kinfo_lwp * @@ -561,7 +559,6 @@ pick_representative_lwp(struct kinfo_pro return kl; } - static struct kinfo_proc2 * getkinfo_kvm(kvm_t *kdp, int what, int flag, int *nentriesp) {