aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-15 10:41:47 +0200
committerJason Wang <jasowang@redhat.com>2016-07-18 16:16:52 +0800
commit4555ca6816c7868323ce2f0138c83e8f9b696622 (patch)
tree187a0b09a9200f41cfbbcf99e56f1e7f8f633499 /net
parent2c5e564f4d8309ee0f47029ab461c4c4459f43c4 (diff)
net: fix incorrect argument to iov_to_buf
Coverity reports a "suspicious sizeof" which is indeed wrong. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/eth.c b/net/eth.c
index c147c2ebb3..df81efb676 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -418,7 +418,7 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
bytes_read = iov_to_buf(pkt, pkt_frags,
rthdr_offset + sizeof(*ext_hdr),
- dst_addr, sizeof(dst_addr));
+ dst_addr, sizeof(*dst_addr));
return bytes_read == sizeof(dst_addr);
}
@@ -467,7 +467,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags,
bytes_read = iov_to_buf(pkt, pkt_frags,
opt_offset + sizeof(opthdr),
- src_addr, sizeof(src_addr));
+ src_addr, sizeof(*src_addr));
return bytes_read == sizeof(src_addr);
}