Refactor cleanup function to remove exit_codeRêver

Remove unused local variable exit_code from cleanup function.
This commit is contained in:
Alexandre
2026-02-03 20:39:48 +01:00
committed by GitHub
parent c038183295
commit a57589f428

View File

@@ -7,10 +7,8 @@ if [[ ! -x "${REAL_IP6TABLES_RESTORE}" ]]; then
fi
cleanup() {
local exit_code=$?
[[ -n "${RULES_FILE:-}" && -f "${RULES_FILE}" ]] && rm -f "${RULES_FILE}"
[[ -n "${SANITIZED_FILE:-}" && -f "${SANITIZED_FILE}" ]] && rm -f "${SANITIZED_FILE}"
return $exit_code
}
trap cleanup EXIT