From e3acfedbe3dcf3c2214d7c1fb5e2f3bc60a9957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 25 Mar 2020 17:00:07 +0100 Subject: [PATCH] Fix 'Dead nested assignment's from scan-build-10 The 1 warning reported is: os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr' if ((ptr = strtok_r(command, " \t", &last)) == NULL) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- bin/named/unix/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index b1ac3b7773..c3b0bbee13 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -842,7 +842,7 @@ named_os_shutdownmsg(char *command, isc_buffer_t *text) { /* Skip the command name. */ - if ((ptr = strtok_r(command, " \t", &last)) == NULL) { + if (strtok_r(command, " \t", &last) == NULL) { return; }