summaryrefslogtreecommitdiffstats
path: root/tests/helpers
diff options
context:
space:
mode:
authorBoris Egorov2016-01-19 07:18:21 +0100
committerBoris Egorov2016-01-19 07:59:12 +0100
commit4ec6062678b105389722fd0b7936c1096a96c7d6 (patch)
tree07359f7bbbb2621e4412d243197b4140a1529781 /tests/helpers
parenthwclock: fix format specifier [cppcheck] (diff)
downloadkernel-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.c5
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);
}