summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorians <ians@cvs.openbsd.org>2019-07-03 00:08:19 +0000
committerians <ians@cvs.openbsd.org>2019-07-03 00:08:19 +0000
commitf945ee2b51789d3e53881b724b97fb8e8a0eb6b4 (patch)
tree11935478cdd9fccc29beb88ce3d1e6822fbe2611 /sys/dev/ic
parente437557c0383a5bec6dde219521a83c2159d67f8 (diff)
Don't check if unsigned value is less than zero
ok kn@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wdc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 8d3eb5b7d44..71fe56016fd 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.134 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: wdc.c,v 1.135 2019/07/03 00:08:18 ians Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -158,8 +158,7 @@ wdc_log(struct channel_softc *chp, enum wdcevent_type type,
unsigned int tail = wdc_tail;
#ifdef DIAGNOSTIC
- if (head < 0 || head > wdc_log_cap ||
- tail < 0 || tail > wdc_log_cap) {
+ if (head > wdc_log_cap || tail > wdc_log_cap) {
printf ("wdc_log: head %x wdc_tail %x\n", head,
tail);
return;
@@ -246,8 +245,7 @@ wdc_get_log(unsigned int * size, unsigned int *left)
}
#ifdef DIAGNOSTIC
- if (head < 0 || head > wdc_log_cap ||
- tail < 0 || tail > wdc_log_cap) {
+ if (head > wdc_log_cap || tail > wdc_log_cap) {
printf ("wdc_log: head %x tail %x\n", head,
tail);
*size = 0;