mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 22:03:35 +08:00
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>
This commit is contained in:
parent
2c5e564f4d
commit
4555ca6816
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user