From: William Lallemand Date: Tue, 15 Apr 2025 09:44:45 +0000 (+0200) Subject: CLEANUP: acme: stored value is overwritten before it can be used X-Git-Tag: v3.2-dev11~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05ebb448b5df6d72e2efd290be84093ae985e49a;p=thirdparty%2Fhaproxy.git CLEANUP: acme: stored value is overwritten before it can be used >>> CID 1609049: Code maintainability issues (UNUSED_VALUE) >>> Assigning value "NULL" to "new_ckchs" here, but that stored value is overwritten before it can be used. 592 struct ckch_store *old_ckchs, *new_ckchs = NULL; Coverity reported an issue where a variable is initialized to NULL then directry overwritten with another value. This doesn't arm but this patch removes the useless initialization. Must fix issue #2932. --- diff --git a/src/acme.c b/src/acme.c index ce7f9684e..044a8d6a0 100644 --- a/src/acme.c +++ b/src/acme.c @@ -591,7 +591,7 @@ error: int acme_update_certificate(struct task *task, struct acme_ctx *ctx, char **errmsg) { int ret = 1; - struct ckch_store *old_ckchs, *new_ckchs = NULL; + struct ckch_store *old_ckchs, *new_ckchs; struct ckch_inst *ckchi; new_ckchs = ctx->store;