]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile_utils: cleanup lxc_get_netdev_by_idx()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 08:46:55 +0000 (09:46 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 10 Dec 2020 19:39:50 +0000 (20:39 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile_utils.c

index a90658b0786c7bbe757b7b50c246dc454c5050f7..531e2eaf88a8658787624b9bfafffb18d3ffa521 100644 (file)
@@ -214,7 +214,7 @@ struct lxc_netdev *lxc_get_netdev_by_idx(struct lxc_conf *conf,
        }
 
        if (!allocate)
-               return NULL;
+               return ret_set_errno(NULL, EINVAL);
 
        return lxc_network_add(insert, idx, true);
 }