From 4ec6062678b105389722fd0b7936c1096a96c7d6 Mon Sep 17 00:00:00 2001 From: Boris Egorov Date: Tue, 19 Jan 2016 12:18:21 +0600 Subject: 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. --- tests/helpers/test_sigreceive.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/helpers') 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); } -- cgit v1.2.3-55-g7522