diff options
author | Ben Pfaff <blp@nicira.com> | 2014-07-10 14:32:10 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-07-10 16:50:44 -0700 |
commit | bebdded84e5232e78d1cbb134257eb85ee049b40 (patch) | |
tree | 0626d941eea24d7f863884202add7a7688f04552 | |
parent | 53d7907cec4b9e926e28399be291148f7882996e (diff) | |
download | openvswitch-bebdded84e5232e78d1cbb134257eb85ee049b40.tar.gz |
netlink-socket: Fix sign of error code.
Commit 8f20fd98db (netlink-socket: Work around upstream kernel Netlink
bug.) got the sign of the error code wrong, so that it reported e.g. -22
for EINVAL to nl_sock_recv__()'s caller, instead of 22.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
-rw-r--r-- | lib/netlink-socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 93757cfb7..2c3eadff0 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -338,7 +338,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, bool wait) error = (retval < 0 ? errno : retval == 0 ? ECONNRESET /* not possible? */ : nlmsghdr->nlmsg_len != UINT32_MAX ? 0 - : -retval); + : retval); } while (error == EINTR); if (error) { if (error == ENOBUFS) { |