summaryrefslogtreecommitdiffstats
path: root/sys/i4b/driver/i4b_trace.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-31 16:57:01 +0000
committerphk <phk@FreeBSD.org>2003-05-31 16:57:01 +0000
commitdc5b07a729fa86298afcafa5a2ff51ef51bcedd7 (patch)
tree0aa3114c7dd732be838bd92f21e8eee8091b3dd9 /sys/i4b/driver/i4b_trace.c
parent170ff8a070ae09ddcfa76d7d4af98f69a84c177a (diff)
downloadFreeBSD-src-dc5b07a729fa86298afcafa5a2ff51ef51bcedd7.zip
FreeBSD-src-dc5b07a729fa86298afcafa5a2ff51ef51bcedd7.tar.gz
Fix systematic off-by-one errors in unit number range checks.
Found by: FlexeLint
Diffstat (limited to 'sys/i4b/driver/i4b_trace.c')
-rw-r--r--sys/i4b/driver/i4b_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c
index d7c89e0..7237fc1 100644
--- a/sys/i4b/driver/i4b_trace.c
+++ b/sys/i4b/driver/i4b_trace.c
@@ -156,7 +156,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf)
/* check valid unit no */
- if((unit = hdr->unit) > NI4BTRC)
+ if((unit = hdr->unit) >= NI4BTRC)
{
printf("i4b_trace: get_trace_data_from_l1 - unit > NI4BTRC!\n");
return(0);
OpenPOWER on IntegriCloud