summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2007-04-24 12:15:05 +0000
committersimokawa <simokawa@FreeBSD.org>2007-04-24 12:15:05 +0000
commit9c6071b7a1d96288a4dfab4f64be388875abcb19 (patch)
tree6da87e3e83a38b548d52997810b687e826b15f59 /sys/dev/firewire
parent761bff4058d662a6b7e717e7f2b1226d4d54f7a5 (diff)
downloadFreeBSD-src-9c6071b7a1d96288a4dfab4f64be388875abcb19.zip
FreeBSD-src-9c6071b7a1d96288a4dfab4f64be388875abcb19.tar.gz
Configuration ROM length should be unsigned.
MFC: 1 week
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r--sys/dev/firewire/firewire.h2
-rw-r--r--sys/dev/firewire/fwdev.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/firewire/firewire.h b/sys/dev/firewire/firewire.h
index ab34748..ee510e6 100644
--- a/sys/dev/firewire/firewire.h
+++ b/sys/dev/firewire/firewire.h
@@ -375,7 +375,7 @@ struct fw_speed_map {
struct fw_crom_buf {
struct fw_eui64 eui;
- int len;
+ uint32_t len;
void *ptr;
};
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index 60e7384..23e95bb 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -712,7 +712,7 @@ out:
else
len = fwdev->rommax - CSRROMOFF + 4;
}
- if (crom_buf->len < len && crom_buf->len >= 0)
+ if (crom_buf->len < len)
len = crom_buf->len;
else
crom_buf->len = len;
OpenPOWER on IntegriCloud