aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-04-06 09:09:53 +0200
committerAndreas Schneider <asn@samba.org>2017-04-06 09:20:16 +0200
commit14adde1d0ea2069b546278529a5e13e113303f51 (patch)
tree14ec6f6665a9cb87be6b29fb47f69353d3b95b23
parentb6708f72588784b5b4c8784df0e1a27817e331d3 (diff)
downloadpam_wrapper-14adde1d0ea2069b546278529a5e13e113303f51.tar.gz
pam_wrapper-14adde1d0ea2069b546278529a5e13e113303f51.tar.xz
pam_wrapper-14adde1d0ea2069b546278529a5e13e113303f51.zip
pypamtest: Do not use variable declaration in for-loop
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--src/python/pypamtest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/pypamtest.c b/src/python/pypamtest.c
index a1b3054..2a2f7c4 100644
--- a/src/python/pypamtest.c
+++ b/src/python/pypamtest.c
@@ -136,6 +136,7 @@ static void free_string_list(char **list)
static char **new_conv_list(const int list_size)
{
char **list;
+ int i;
list = PyMem_New(char *, list_size + 1);
if (list == NULL) {
@@ -143,7 +144,7 @@ static char **new_conv_list(const int list_size)
}
list[list_size] = NULL;
- for (int i =0; i < list_size; i++) {
+ for (i = 0; i < list_size; i++) {
list[i] = PyMem_New(char, PAM_MAX_MSG_SIZE);
if (list[i] == NULL) {
PyMem_Free(list);