From: Ondřej Surý Date: Wed, 25 Mar 2020 16:00:07 +0000 (+0100) Subject: Fix 'Dead nested assignment's from scan-build-10 X-Git-Tag: v9.14.12~8^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3acfedbe3dcf3c2214d7c1fb5e2f3bc60a9957e;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index b1ac3b7773d..c3b0bbee139 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; }