diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-01-30 17:02:56 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-01-30 17:02:56 +0000 |
commit | f3f5188fb43d61ba89fc3629e1c272402166067e (patch) | |
tree | efae1ca6d8c8efe546d031c2cc009f8fdd5eab49 | |
parent | f6650ee98294437bcfac9b8439523932333231bb (diff) |
always check for kvm_openfiles failure; pointed out by juan@coredump.com.ar in pr/2362
-rw-r--r-- | bin/ps/ps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 62b56f8410e..2ec97eff64f 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ps.c,v 1.23 2001/09/27 12:53:47 mpech Exp $ */ +/* $OpenBSD: ps.c,v 1.24 2002/01/30 17:02:55 mickey Exp $ */ /* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: ps.c,v 1.23 2001/09/27 12:53:47 mpech Exp $"; +static char rcsid[] = "$OpenBSD: ps.c,v 1.24 2002/01/30 17:02:55 mickey Exp $"; #endif #endif /* not lint */ @@ -286,7 +286,7 @@ main(argc, argv) } kd = kvm_openfiles(nlistf, memf, swapf, O_RDONLY, errbuf); - if (kd == NULL && (nlistf != NULL || memf != NULL || swapf != NULL)) + if (kd == NULL) errx(1, "%s", errbuf); setegid(getgid()); |