diff options
author | Boris Egorov | 2015-06-19 21:41:01 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-25 12:08:53 +0200 |
commit | 13c551f259423d97e6edf1380d5d9e93d77ebc89 (patch) | |
tree | 481d733f95612d6a5e2237a07f2724cdc7d2918f /disk-utils/cfdisk.c | |
parent | libblkid/whereis: simplify some conditions [cppcheck] (diff) | |
download | kernel-qcow2-util-linux-13c551f259423d97e6edf1380d5d9e93d77ebc89.tar.gz kernel-qcow2-util-linux-13c551f259423d97e6edf1380d5d9e93d77ebc89.tar.xz kernel-qcow2-util-linux-13c551f259423d97e6edf1380d5d9e93d77ebc89.zip |
cfdisk: fix condition logic [cppcheck]
[disk-utils/cfdisk.c:1181] -> [disk-utils/cfdisk.c:1181]: (warning)
Possible null pointer dereference: data - otherwise it is redundant to
check it against null.
Signed-off-by: Boris Egorov <egorov@linux.com>
Diffstat (limited to 'disk-utils/cfdisk.c')
-rw-r--r-- | disk-utils/cfdisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 6f26a3d44..462710719 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -1178,7 +1178,7 @@ inline static int extra_insert_pair(struct cfdisk_line *l, const char *name, con assert(l); - if (!data && !*data) + if (!data || !*data) return 0; lsl = scols_table_new_line(l->extra, NULL); |