Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102716954
D37485.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D37485.diff
View Options
diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c
--- a/usr.sbin/bhyve/pci_e82545.c
+++ b/usr.sbin/bhyve/pci_e82545.c
@@ -1045,7 +1045,7 @@
DPRINTF("tx cksum: iovcnt/s/off/len %d/%d/%d/%d",
iovcnt, ck->ck_start, ck->ck_off, ck->ck_len);
- cklen = ck->ck_len ? ck->ck_len - ck->ck_start + 1 : UINT_MAX;
+ cklen = ck->ck_len ? ck->ck_len - ck->ck_start + 1U : UINT_MAX;
cksum = e82545_iov_checksum(iov, iovcnt, ck->ck_start, cklen);
*(uint16_t *)((uint8_t *)iov[0].iov_base + ck->ck_off) = ~cksum;
}
@@ -1231,9 +1231,9 @@
if (!tso) {
/* Estimate required writable space for checksums. */
if (ckinfo[0].ck_valid)
- hdrlen = MAX(hdrlen, ckinfo[0].ck_off + 2);
+ hdrlen = MAX(hdrlen, ckinfo[0].ck_off + 2U);
if (ckinfo[1].ck_valid)
- hdrlen = MAX(hdrlen, ckinfo[1].ck_off + 2);
+ hdrlen = MAX(hdrlen, ckinfo[1].ck_off + 2U);
/* Round up writable space to the first vector. */
if (hdrlen != 0 && iov[0].iov_len > hdrlen &&
iov[0].iov_len < hdrlen + 100)
@@ -1282,26 +1282,26 @@
* TCP | flags | 13 | 1
* UDP | len | 4 | 4
*/
- if (hdrlen < ckinfo[0].ck_start + 6 ||
- hdrlen < ckinfo[0].ck_off + 2) {
+ if (hdrlen < ckinfo[0].ck_start + 6U ||
+ hdrlen < ckinfo[0].ck_off + 2U) {
WPRINTF("TSO hdrlen too small for IP fields (%d) "
"-- dropped", hdrlen);
goto done;
}
if (sc->esc_txctx.cmd_and_length & E1000_TXD_CMD_TCP) {
- if (hdrlen < ckinfo[1].ck_start + 14) {
+ if (hdrlen < ckinfo[1].ck_start + 14U) {
WPRINTF("TSO hdrlen too small for TCP fields "
"(%d) -- dropped", hdrlen);
goto done;
}
} else {
- if (hdrlen < ckinfo[1].ck_start + 8) {
+ if (hdrlen < ckinfo[1].ck_start + 8U) {
WPRINTF("TSO hdrlen too small for UDP fields "
"(%d) -- dropped", hdrlen);
goto done;
}
}
- if (ckinfo[1].ck_valid && hdrlen < ckinfo[1].ck_off + 2) {
+ if (ckinfo[1].ck_valid && hdrlen < ckinfo[1].ck_off + 2U) {
WPRINTF("TSO hdrlen too small for TCP/UDP fields "
"(%d) -- dropped", hdrlen);
goto done;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 7:08 AM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14672245
Default Alt Text
D37485.diff (2 KB)
Attached To
Mode
D37485: bhyve: Fix sign compare warnings in the e1000 device model.
Attached
Detach File
Event Timeline
Log In to Comment