Fix: argpar.c: logically dead code
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 18:44:44 +0000 (14:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:20 +0000 (11:58 -0400)
Found by Coverity Scan.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Id67092bcdb0a0ebf7aa29186668457596c177ca6

src/argpar/argpar.c

index fe78a008a5eebba4c8dc9cae982d64a0b25858c6..d3451207f548127ad34f41dbc77fd8b934fc398e 100644 (file)
@@ -64,7 +64,7 @@ struct bt_argpar_item_opt *create_opt_item(
 
        if (arg) {
                opt_item->arg = g_strdup(arg);
-               if (!opt_item) {
+               if (!opt_item->arg) {
                        goto error;
                }
        }
This page took 0.025112 seconds and 4 git commands to generate.