Module Name:    src
Committed By:   yamt
Date:           Sun Jun 13 03:32:48 UTC 2010

Modified Files:
        src/sys/kern: tty_pty.c

Log Message:
use NULL instead of 0 for pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/kern/tty_pty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/tty_pty.c
diff -u src/sys/kern/tty_pty.c:1.121 src/sys/kern/tty_pty.c:1.122
--- src/sys/kern/tty_pty.c:1.121	Sun Jan 24 19:56:26 2010
+++ src/sys/kern/tty_pty.c	Sun Jun 13 03:32:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_pty.c,v 1.121 2010/01/24 19:56:26 dholland Exp $	*/
+/*	$NetBSD: tty_pty.c,v 1.122 2010/06/13 03:32:47 yamt Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.121 2010/01/24 19:56:26 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.122 2010/06/13 03:32:47 yamt Exp $");
 
 #include "opt_ptm.h"
 
@@ -449,7 +449,7 @@
 	struct pt_softc *pti = pt_softc[minor(dev)];
 	struct tty *tp = pti->pt_tty;
 
-	if (tp->t_oproc == 0)
+	if (tp->t_oproc == NULL)
 		return (EIO);
 	return ((*tp->t_linesw->l_write)(tp, uio, flag));
 }
@@ -463,7 +463,7 @@
 	struct pt_softc *pti = pt_softc[minor(dev)];
 	struct tty *tp = pti->pt_tty;
 
-	if (tp->t_oproc == 0)
+	if (tp->t_oproc == NULL)
 		return (POLLHUP);
 
 	return ((*tp->t_linesw->l_poll)(tp, events, l));
@@ -577,7 +577,7 @@
 	(void)(*tp->t_linesw->l_modem)(tp, 0);
 	mutex_spin_enter(&tty_lock);
 	CLR(tp->t_state, TS_CARR_ON);
-	tp->t_oproc = 0;		/* mark closed */
+	tp->t_oproc = NULL;		/* mark closed */
 	mutex_spin_exit(&tty_lock);
 	return (0);
 }

Reply via email to