diff --git a/include/netlink-local.h b/include/netlink-local.h index 01c611a..9544d29 100644 --- a/include/netlink-local.h +++ b/include/netlink-local.h @@ -194,8 +194,10 @@ static inline int wait_for_ack(struct nl_sock *sk) { if (sk->s_flags & NL_NO_AUTO_ACK) return 0; - else - return nl_wait_for_ack(sk); + else { + int err = nl_wait_for_ack(sk); + return (err < 0) ? err : 0; + } } static inline int build_sysconf_path(char **strp, const char *filename)