CLEANUP: check; Remove some useless assignments to NULL

In process_chk_conn(), some assignments to NULL are useless and are reported
by Coverity as unused value. while it is harmless, these assignments can be
removed.

This patch should fix the coverity report #2158.
This commit is contained in:
Christopher Faulet 2023-05-17 09:25:32 +02:00
parent 0d2f1acee6
commit cb76030356

View File

@ -1242,7 +1242,6 @@ struct task *process_chk_conn(struct task *t, void *context, unsigned int state)
if (check->state & CHK_ST_CLOSE_CONN) {
TRACE_DEVEL("closing current connection", CHK_EV_TASK_WAKE|CHK_EV_HCHK_RUN, check);
check->state &= ~CHK_ST_CLOSE_CONN;
conn = NULL;
if (!sc_reset_endp(check->sc)) {
/* error will be handled by tcpcheck_main().
* On success, remove all flags except SE_FL_DETACHED
@ -1277,8 +1276,7 @@ struct task *process_chk_conn(struct task *t, void *context, unsigned int state)
if (sc) {
sc_destroy(sc);
sc = check->sc = NULL;
conn = NULL;
check->sc = NULL;
}
if (check->sess != NULL) {