From: Alan T. DeKok Date: Mon, 29 May 2017 16:56:02 +0000 (-0400) Subject: make FD scope smaller to shut up static analysis X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faeb1dff809807f26e08db2377f162a36338b151;p=thirdparty%2Ffreeradius-server.git make FD scope smaller to shut up static analysis CID #1233595 --- diff --git a/src/modules/rlm_linelog/rlm_linelog.c b/src/modules/rlm_linelog/rlm_linelog.c index 1f60f0f27f6..7ede266a953 100644 --- a/src/modules/rlm_linelog/rlm_linelog.c +++ b/src/modules/rlm_linelog/rlm_linelog.c @@ -463,7 +463,6 @@ static size_t linelog_escape_func(UNUSED REQUEST *request, static rlm_rcode_t mod_do_linelog(void *instance, UNUSED void *thread, REQUEST *request) CC_HINT(nonnull); static rlm_rcode_t mod_do_linelog(void *instance, UNUSED void *thread, REQUEST *request) { - int fd = -1; linelog_conn_t *conn; struct timeval *timeout = NULL; @@ -649,6 +648,7 @@ build_vector: switch (inst->log_dst) { case LINELOG_DST_FILE: { + int fd = -1; char path[2048]; if (xlat_eval(path, sizeof(path), request, inst->file.name, inst->file.escape_func, NULL) < 0) {