Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/fstat Don't compare integers and NULL.



details:   https://anonhg.NetBSD.org/src/rev/9214c6dc78bf
branches:  trunk
changeset: 553749:9214c6dc78bf
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Oct 21 02:16:59 2003 +0000

description:
Don't compare integers and NULL.

diffstat:

 usr.bin/fstat/fstat.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 505d36310630 -r 9214c6dc78bf usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Tue Oct 21 02:16:34 2003 +0000
+++ b/usr.bin/fstat/fstat.c     Tue Oct 21 02:16:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.64 2003/08/07 11:13:51 agc Exp $   */
+/*     $NetBSD: fstat.c,v 1.65 2003/10/21 02:16:59 fvdl Exp $  */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)fstat.c    8.3 (Berkeley) 5/2/95";
 #else
-__RCSID("$NetBSD: fstat.c,v 1.64 2003/08/07 11:13:51 agc Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.65 2003/10/21 02:16:59 fvdl Exp $");
 #endif
 #endif /* not lint */
 
@@ -319,7 +319,7 @@
        Pid = p->p_pid;
        Comm = p->p_comm;
 
-       if (p->p_fd == NULL || p->p_cwdi == NULL)
+       if (p->p_fd == 0 || p->p_cwdi == 0)
                return;
        if (!KVM_READ(p->p_fd, &filed0, sizeof (filed0))) {
                warnx("can't read filedesc at %#llx for pid %d", (unsigned long long)p->p_fd, Pid);



Home | Main Index | Thread Index | Old Index