Skip to content

Commit b5e7719

Browse files
authored
Use C89 prior variable init to remove last critical c-extension lint error (#310)
Change one for-loop to use C89-style prior 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.
2 parents 117cf3d + 03f2beb commit b5e7719

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mig/src/libpam-mig/libpam_mig.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ static int converse(pam_handle_t * pamh, int nargs,
236236
/* this function frees PAM response structures */
237237
static void free_pam_response(struct pam_response *resp, int nargs)
238238
{
239+
int i;
239240
if (resp != NULL) {
240-
for (int i = 0; i < nargs; i++) {
241+
for (i = 0; i < nargs; i++) {
241242
if (resp[i].resp != NULL) {
242243
free(resp[i].resp);
243244
resp[i].resp = NULL;

0 commit comments

Comments
 (0)