Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ps KNF
details: https://anonhg.NetBSD.org/src/rev/59ede14e747e
branches: trunk
changeset: 349190:59ede14e747e
user: rin <rin%NetBSD.org@localhost>
date: Mon Nov 28 08:18:27 2016 +0000
description:
KNF
ok martin
diffstat:
bin/ps/ps.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (64 lines):
diff -r d99de5a62de8 -r 59ede14e747e bin/ps/ps.c
--- a/bin/ps/ps.c Mon Nov 28 07:29:56 2016 +0000
+++ b/bin/ps/ps.c Mon Nov 28 08:18:27 2016 +0000
@@ -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 @@
#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 @@
break; /* no-op - was dontuseprocfs */
case 'L':
showkey();
- exit(0);
- /* NOTREACHED */
+ return 0;
case 'l':
parsefmt(lfmt);
fmt = 1;
@@ -387,7 +386,7 @@
} 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 @@
err(1, "%s", kvm_geterr(kd));
if (nentries == 0) {
printheader();
- exit(1);
+ return 1;
}
/*
* sort proc list
@@ -499,8 +498,7 @@
}
}
}
- exit(eval);
- /* NOTREACHED */
+ return eval;
}
static struct kinfo_lwp *
@@ -561,7 +559,6 @@
return kl;
}
-
static struct kinfo_proc2 *
getkinfo_kvm(kvm_t *kdp, int what, int flag, int *nentriesp)
{
Home |
Main Index |
Thread Index |
Old Index