From 8ac43fee1a2890d62edfe29282f66780bc1b634f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 14 Aug 2015 12:45:06 +0200 Subject: tree-wide: generate EBADF when we get invalid fds This is a follow-up to #907, and makes the same change for all our other public APIs. --- src/libsystemd/sd-netlink/sd-netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsystemd/sd-netlink/sd-netlink.c') diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index c413b1c266..d248869c8d 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -106,7 +106,7 @@ int sd_netlink_open_fd(sd_netlink **ret, int fd) { int r; assert_return(ret, -EINVAL); - assert_return(fd >= 0, -EINVAL); + assert_return(fd >= 0, -EBADF); r = sd_netlink_new(&rtnl); if (r < 0) -- cgit v1.2.3-54-g00ecf