diff options
author | 2011-07-06 04:49:35 +0000 | |
---|---|---|
committer | 2011-07-06 04:49:35 +0000 | |
commit | d1e5b14ce27677c18027bd4cc75633df5e5acccf (patch) | |
tree | c7045e866fdf213f4e9aa471ee8f12213caaed7a /sys/dev/vnd.c | |
parent | Return the correct error for fchdir(not_file_or_dir) (diff) | |
download | wireguard-openbsd-d1e5b14ce27677c18027bd4cc75633df5e5acccf.tar.xz wireguard-openbsd-d1e5b14ce27677c18027bd4cc75633df5e5acccf.zip |
Eliminate redundant buf validation checks in xxstrategy() methods now
that they're implemented consistently in bounds_check_with_label().
Also, per krw's request, change bounds_check_with_label() to return 0
if the checks succeed, and change the drivers to test == -1 instead of
<= 0. (Man page update to follow; intentionally omitting
arch/vax/mba/hp.c from this commit because it doesn't even build
currently and miod@ promises to kill it soon.)
ok krw@
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index e71d9d7850a..7f391bc3157 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.137 2011/07/04 20:35:34 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.138 2011/07/06 04:49:36 matthew Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -292,7 +292,7 @@ vndstrategy(struct buf *bp) /* If we have a label, do a boundary check. */ if (sc->sc_flags & VNF_HAVELABEL) { - if (bounds_check_with_label(bp, sc->sc_dk.dk_label) <= 0) + if (bounds_check_with_label(bp, sc->sc_dk.dk_label) == -1) goto done; /* |