diff options
author | eivind <eivind@FreeBSD.org> | 1999-01-10 01:58:29 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-01-10 01:58:29 +0000 |
commit | 89e11995349cb9c2dab945decdcca7c775b1da23 (patch) | |
tree | cbf327b4157cdef7815c3325d5228ee8a2401bb7 /sys/kern/tty_snoop.c | |
parent | 541b200a907df9730d6c52f272bc2eb5385c41fe (diff) | |
download | FreeBSD-src-89e11995349cb9c2dab945decdcca7c775b1da23.zip FreeBSD-src-89e11995349cb9c2dab945decdcca7c775b1da23.tar.gz |
KNFize, by bde.
Diffstat (limited to 'sys/kern/tty_snoop.c')
-rw-r--r-- | sys/kern/tty_snoop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index 06f17dd..ba71a94 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -136,7 +136,7 @@ snpread(dev, uio, flag) char *nbuf; KASSERT(snp->snp_len + snp->snp_base <= snp->snp_blen, - ("snoop buffer error")); + ("snoop buffer error")); if (snp->snp_tty == NULL) return (EIO); @@ -206,12 +206,11 @@ snpin(snp, buf, n) caddr_t from, to; char *nbuf; + KASSERT(n >= 0, ("negative snoop char count")); if (n == 0) return 0; - KASSERT(n > 0, ("negative snoop char count")); - #ifdef DIAGNOSTIC if (!(snp->snp_flags & SNOOP_OPEN)) { printf("Snoop: data coming to closed device.\n"); |