]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix 'Dead nested assignment's from scan-build-10
authorOndřej Surý <ondrej@isc.org>
Wed, 25 Mar 2020 16:00:07 +0000 (17:00 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 26 Mar 2020 12:42:35 +0000 (13:42 +0100)
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

index b1ac3b7773d3f72c74836d1a474cd14713481735..c3b0bbee13915caf43558437e6314364a6a7cb4e 100644 (file)
@@ -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;
        }