summaryrefslogtreecommitdiffstats
path: root/sys/dev/snp
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-10 18:10:08 +0000
committerphk <phk@FreeBSD.org>1999-05-10 18:10:08 +0000
commit563f9088bed943b10ef16039fbe5a6512ac0a99b (patch)
treeeeb79b6d340b29310de27bc8b6429b4816cf1a81 /sys/dev/snp
parentdf85d5a50f44492d3f123eee0ac0304369471e85 (diff)
downloadFreeBSD-src-563f9088bed943b10ef16039fbe5a6512ac0a99b.zip
FreeBSD-src-563f9088bed943b10ef16039fbe5a6512ac0a99b.tar.gz
Use NODEV instead of -1
Diffstat (limited to 'sys/dev/snp')
-rw-r--r--sys/dev/snp/snp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 204088c..1018083 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -317,7 +317,7 @@ snpopen(dev, flag, mode, p)
* snp_tty == NULL is for inactive snoop devices.
*/
snp->snp_tty = NULL;
- snp->snp_target = -1;
+ snp->snp_target = NODEV;
return (0);
}
@@ -349,7 +349,7 @@ snp_detach(snp)
printf("Snoop: bad attached tty data.\n");
snp->snp_tty = NULL;
- snp->snp_target = -1;
+ snp->snp_target = NODEV;
detach_notty:
selwakeup(&snp->snp_sel);
@@ -404,7 +404,7 @@ snpioctl(dev, cmd, data, flags, p)
switch (cmd) {
case SNPSTTY:
tdev = *((dev_t *) data);
- if (tdev == -1)
+ if (tdev == NODEV)
return (snpdown(snp));
tp = snpdevtotty(tdev);
@@ -419,7 +419,7 @@ snpioctl(dev, cmd, data, flags, p)
s = spltty();
- if (snp->snp_target == -1) {
+ if (snp->snp_target == NODEV) {
tpo = snp->snp_tty;
if (tpo)
tpo->t_state &= ~TS_SNOOP;
OpenPOWER on IntegriCloud