diff options
author | Boris Egorov | 2016-01-19 07:18:21 +0100 |
---|---|---|
committer | Boris Egorov | 2016-01-19 07:59:12 +0100 |
commit | 4ec6062678b105389722fd0b7936c1096a96c7d6 (patch) | |
tree | 07359f7bbbb2621e4412d243197b4140a1529781 /tests/helpers | |
parent | hwclock: fix format specifier [cppcheck] (diff) | |
download | kernel-qcow2-util-linux-4ec6062678b105389722fd0b7936c1096a96c7d6.tar.gz kernel-qcow2-util-linux-4ec6062678b105389722fd0b7936c1096a96c7d6.tar.xz kernel-qcow2-util-linux-4ec6062678b105389722fd0b7936c1096a96c7d6.zip |
tests: remove redundant check for NULL [cppcheck]
We set SA_SIGINFO flag, so we should not get NULL.
[tests/helpers/test_sigreceive.c:45] -> [tests/helpers/test_sigreceive.c:47]: (warning) Either the condition 'if(info)' is redundant or there is possible null pointer dereference: info.
Diffstat (limited to 'tests/helpers')
-rw-r--r-- | tests/helpers/test_sigreceive.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/helpers/test_sigreceive.c b/tests/helpers/test_sigreceive.c index f1b954688..12b563a0e 100644 --- a/tests/helpers/test_sigreceive.c +++ b/tests/helpers/test_sigreceive.c @@ -44,9 +44,8 @@ void exiter(int signo __attribute__((__unused__)), { int ret = info->si_signo; - if (info) - if (info->si_code == SI_QUEUE && info->si_value.sival_int != 0) - ret = info->si_value.sival_int; + if (info->si_code == SI_QUEUE && info->si_value.sival_int != 0) + ret = info->si_value.sival_int; _exit(ret); } |