]> git.proxmox.com Git - mirror_lxc.git/commitdiff
tools: lxc-config: fix coding style of strncmp
author2xsec <dh48.jeong@samsung.com>
Sun, 1 Jul 2018 13:40:19 +0000 (22:40 +0900)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Jul 2018 09:13:36 +0000 (11:13 +0200)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/lxc/tools/lxc_config.c

index b1f99c574cd51a4f88bc3fdddbfcda3294207830..c71a3109ba79d7c504c888d842aaf5f1528ebfe7 100644 (file)
@@ -61,15 +61,15 @@ int main(int argc, char *argv[])
        struct lxc_config_items *i;
        const char *value;
 
-       if (argc < 2 || !strncmp(argv[1], "-h", strlen(argv[1])) ||
-                       !strncmp(argv[1], "--help", strlen(argv[1])))
+       if (argc < 2 || strncmp(argv[1], "-h", strlen(argv[1])) == 0 ||
+                       strncmp(argv[1], "--help", strlen(argv[1])) == 0)
                usage(argv[0]);
 
-       if (!strncmp(argv[1], "-l", strlen(argv[1])))
+       if (strncmp(argv[1], "-l", strlen(argv[1])) == 0)
                list_config_items();
 
        for (i = &items[0]; i->name; i++) {
-               if (!strncmp(argv[1], i->name, strlen(argv[1]))) {
+               if (strncmp(argv[1], i->name, strlen(argv[1])) == 0) {
                        value = lxc_get_global_config_item(i->name);
                        if (value)
                                printf("%s\n", value);