]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
network: use correct type in lxc_netns_set_nsid()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 11 Sep 2018 12:02:03 +0000 (14:02 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 11 Sep 2018 12:02:03 +0000 (14:02 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/network.c

index c4e292e12857c1ab1bd202bce73ca96ceea12367..9fcd3b07cd24fbdc73aea86a291b3e8c72cde10f 100644 (file)
@@ -3196,7 +3196,7 @@ enum {
 
 int lxc_netns_set_nsid(int fd)
 {
-       ssize_t ret;
+       int ret;
        char buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) +
                 NLMSG_ALIGN(sizeof(struct rtgenmsg)) +
                 NLMSG_ALIGN(1024)];
@@ -3209,7 +3209,7 @@ int lxc_netns_set_nsid(int fd)
 
        ret = netlink_open(&nlh, NETLINK_ROUTE);
        if (ret < 0)
-               return ret;
+               return -1;
 
        memset(buf, 0, sizeof(buf));
        hdr = (struct nlmsghdr *)buf;