]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: prevent signed-issues
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 9 Feb 2019 00:33:18 +0000 (01:33 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 9 Feb 2019 00:33:18 +0000 (01:33 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index b4bb6ef9a0db53acce19e1de966d2b87f9b749f5..89262c736804565be132929a8e321881f0bc33e3 100644 (file)
@@ -1507,11 +1507,11 @@ int resolve_clone_flags(struct lxc_handler *handler)
        struct lxc_conf *conf = handler->conf;
 
        for (i = 0; i < LXC_NS_MAX; i++) {
-               if (conf->ns_keep > 0) {
-                       if ((conf->ns_keep & ns_info[i].clone_flag) == 0)
+               if (conf->ns_keep) {
+                       if (!(conf->ns_keep & ns_info[i].clone_flag))
                                handler->ns_clone_flags |= ns_info[i].clone_flag;
-               } else if (conf->ns_clone > 0) {
-                       if ((conf->ns_clone & ns_info[i].clone_flag) > 0)
+               } else if (conf->ns_clone) {
+                       if ((conf->ns_clone & ns_info[i].clone_flag))
                                handler->ns_clone_flags |= ns_info[i].clone_flag;
                } else {
                        if (i == LXC_NS_USER && lxc_list_empty(&handler->conf->id_map))