From 03f2beb42352d822fc3316a9c5170bc0d0bbf867 Mon Sep 17 00:00:00 2001 From: Jonas Bardino Date: Thu, 7 Aug 2025 10:41:38 +0200 Subject: [PATCH] Change to simple C89 variable init to remove last critical splint error and make lint action pass. Not ideal if it prevents eventual move to C99 standards, but AFAICT we do use C89 variable declarations in all other locations. So it's no big deal at the moment and does add consistency. --- mig/src/libpam-mig/libpam_mig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mig/src/libpam-mig/libpam_mig.c b/mig/src/libpam-mig/libpam_mig.c index 786e57eaf..7444333cd 100644 --- a/mig/src/libpam-mig/libpam_mig.c +++ b/mig/src/libpam-mig/libpam_mig.c @@ -236,8 +236,9 @@ static int converse(pam_handle_t * pamh, int nargs, /* this function frees PAM response structures */ static void free_pam_response(struct pam_response *resp, int nargs) { + int i; if (resp != NULL) { - for (int i = 0; i < nargs; i++) { + for (i = 0; i < nargs; i++) { if (resp[i].resp != NULL) { free(resp[i].resp); resp[i].resp = NULL;