Replace NOCDEV with NULL. NOCDEV was ((void *)-1) and as inherited
[games.git] / lib / libkvm / kvm_proc.c
index f4d353a..4dd8f51 100644 (file)
@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.25.2.3 2002/08/24 07:27:46 kris Exp $
- * $DragonFly: src/lib/libkvm/kvm_proc.c,v 1.12 2007/02/18 16:15:23 corecode Exp $
+ * $DragonFly: src/lib/libkvm/kvm_proc.c,v 1.14 2007/05/08 02:31:36 dillon Exp $
  *
  * @(#)kvm_proc.c      8.3 (Berkeley) 9/23/93
  */
@@ -47,7 +47,7 @@
  * most other applications are interested only in open/close/read/nlist).
  */
 
-#include <sys/user.h>
+#include <sys/user.h>  /* MUST BE FIRST */
 #include <sys/conf.h>
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -192,9 +192,9 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p,
                                return (-1);
                        }
                        sess.s_ttyp = &tty;
-                       if (tty.t_dev && tty.t_dev != NOCDEV) {
+                       if (tty.t_dev && tty.t_dev != NULL) {
                                if (KREAD(kd, (u_long)tty.t_dev, &cdev))
-                                       tty.t_dev = NOCDEV;
+                                       tty.t_dev = NULL;
                                else
                                        tty.t_dev = &cdev;
                        }