mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
pcap-file: Correctly format enum type.
The underlying type for an enum is somewhat unpredictable in that the
compiler and the ABI influence it. The format specifier I used here was
apparently correct for i386 on Linux but wrong for x86-64. It's better to
just use a cast.
Fixes: 597177a283
("pcap-file: Add support for Linux SLL formatted PCAP files.")
Reported-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -153,8 +153,8 @@ ovs_pcap_read_header(struct pcap_file *p_file)
|
||||
p_file->network = byte_swap ? uint32_byteswap(ph.network) : ph.network;
|
||||
if (p_file->network != PCAP_ETHERNET &&
|
||||
p_file->network != PCAP_LINUX_SLL) {
|
||||
VLOG_WARN("unknown network type %"PRIu16" reading pcap file",
|
||||
p_file->network);
|
||||
VLOG_WARN("unknown network type %u reading pcap file",
|
||||
(unsigned int) p_file->network);
|
||||
return EPROTO;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user