Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix NULL pointer access. Patch supplied by Dave Hua...
details: https://anonhg.NetBSD.org/src/rev/a0c147fa35ff
branches: trunk
changeset: 474876:a0c147fa35ff
user: tron <tron%NetBSD.org@localhost>
date: Sat Jul 24 15:10:02 1999 +0000
description:
Fix NULL pointer access. Patch supplied by Dave Huang in PR kern/8055.
diffstat:
sys/kern/tty.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ce46686775a0 -r a0c147fa35ff sys/kern/tty.c
--- a/sys/kern/tty.c Sat Jul 24 15:06:57 1999 +0000
+++ b/sys/kern/tty.c Sat Jul 24 15:10:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.114 1999/07/22 18:13:37 thorpej Exp $ */
+/* $NetBSD: tty.c,v 1.115 1999/07/24 15:10:02 tron Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1991, 1993
@@ -1958,7 +1958,7 @@
ttyprintf(tp, "empty foreground process group\n");
else {
/* Pick interesting process. */
- for (pick = NULL; p != 0; p = p->p_pglist.le_next)
+ for (pick = NULL; p != NULL; p = p->p_pglist.le_next)
if (proc_compare(pick, p))
pick = p;
@@ -1992,7 +1992,7 @@
ttyprintf(tp, "%d%% ", tmp / 100);
/* Print resident set size. */
- if (pick->p_stat == SIDL || P_ZOMBIE(p))
+ if (pick->p_stat == SIDL || P_ZOMBIE(pick))
tmp = 0;
else {
register struct vmspace *vm = pick->p_vmspace;
Home |
Main Index |
Thread Index |
Old Index