s4/dsdb/common: clang: Fix 'Value stored to 'cps_stdin' is never read'
authorNoel Power <noel.power@suse.com>
Fri, 5 Jul 2019 11:16:45 +0000 (11:16 +0000)
committerGary Lockyer <gary@samba.org>
Wed, 24 Jul 2019 04:19:27 +0000 (04:19 +0000)
Fixes:

source4/dsdb/common/util.c:2125:4: warning: Value stored to 'cps_stdin' is never read <--[clang]
                        cps_stdin = -1;

                        ^           ~~
source4/dsdb/common/util.c:2132:3: warning: Value stored to 'cps_stdin' is never read <--[clang]
                cps_stdin = -1;

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/common/util.c

index 13354384f09e24cea3946f11267e28ccbae49943..db19d484cf4b94987d042b749c35adc74ad80182 100644 (file)
@@ -2127,14 +2127,12 @@ enum samr_ValidationStatus samdb_check_password(TALLOC_CTX *mem_ctx,
 
                if (write(cps_stdin, utf8_pw, utf8_len) != utf8_len) {
                        close(cps_stdin);
-                       cps_stdin = -1;
                        TALLOC_FREE(password_script);
                        TALLOC_FREE(event_ctx);
                        return SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR;
                }
 
                close(cps_stdin);
-               cps_stdin = -1;
 
                if (!tevent_req_poll(req, event_ctx)) {
                        TALLOC_FREE(password_script);