Socket can be 0 and it's accounted in previews patch. Correct that function too.
Signed-off-by: Maxim Uvarov <[email protected]> --- platform/linux-generic/odp_packet_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 5c0a44c..0f2dc33 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -561,7 +561,7 @@ int odp_pktio_set_mtu(odp_pktio_t id, int mtu) return -1; } - if (entry->s.pkt_sock_mmap.sockfd) + if (entry->s.pkt_sock_mmap.sockfd > -1) sockfd = entry->s.pkt_sock_mmap.sockfd; else sockfd = entry->s.pkt_sock.sockfd; @@ -591,7 +591,7 @@ int odp_pktio_mtu(odp_pktio_t id) return -1; } - if (entry->s.pkt_sock_mmap.sockfd) + if (entry->s.pkt_sock_mmap.sockfd > -1) sockfd = entry->s.pkt_sock_mmap.sockfd; else sockfd = entry->s.pkt_sock.sockfd; -- 1.8.5.1.163.gd7aced9 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
