[PATCH] netlink: Don't change error code signs
by Andrew Zaborowski
Netlink errors returned by the kernel are already negative so don't
change the sign, this was confusing some iwd code that depends on
negative error numbers from l_netlink.
---
ell/netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/netlink.c b/ell/netlink.c
index d247173..d1871ba 100644
--- a/ell/netlink.c
+++ b/ell/netlink.c
@@ -178,7 +178,7 @@ static void process_message(struct l_netlink *netlink, struct nlmsghdr *nlmsg)
case NLMSG_ERROR:
err = data + NLMSG_HDRLEN;
- command->handler(-err->error, 0, NULL, 0,
+ command->handler(err->error, 0, NULL, 0,
command->user_data);
break;
}
--
2.17.1
3 years, 10 months