diff options
author | Steve Langasek <steve.langasek@canonical.com> | 2020-08-11 14:54:35 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@canonical.com> | 2020-08-11 15:00:33 -0700 |
commit | 239d9c3181694bda5a0531ac579612c46c3b4e6d (patch) | |
tree | 43c04725cde922627215f4c32665ea832dd456d1 /xtests/tst-pam_time1.c | |
parent | aa2142277bf5fb4a884c6119180e41258817705b (diff) | |
parent | f6d08ed47a3da3c08345bce2ca366e961c52ad7c (diff) | |
download | pam-239d9c3181694bda5a0531ac579612c46c3b4e6d.tar.gz pam-239d9c3181694bda5a0531ac579612c46c3b4e6d.tar.bz2 pam-239d9c3181694bda5a0531ac579612c46c3b4e6d.zip |
Merge upstream version 1.4.0
Diffstat (limited to 'xtests/tst-pam_time1.c')
-rw-r--r-- | xtests/tst-pam_time1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xtests/tst-pam_time1.c b/xtests/tst-pam_time1.c index 9fc0669e..18dfeba9 100644 --- a/xtests/tst-pam_time1.c +++ b/xtests/tst-pam_time1.c @@ -49,6 +49,7 @@ #include <stdlib.h> #include <string.h> #include <security/pam_appl.h> +#include "pam_inline.h" struct test_t { @@ -65,8 +66,6 @@ static struct test_t tests[] = { {"y", 6}, }; -static int num_tests = sizeof (tests) / sizeof (struct test_t); - static struct pam_conv conv = { NULL, NULL }; @@ -77,12 +76,12 @@ main(int argc, char *argv[]) pam_handle_t *pamh = NULL; int retval; int debug = 0; - int i; + unsigned int i; if (argc > 1 && strcmp (argv[1], "-d") == 0) debug = 1; - for (i = 0; i < num_tests; i++) + for (i = 0; i < PAM_ARRAY_SIZE(tests); i++) { retval = pam_start("tst-pam_time1", tests[i].user, &conv, &pamh); if (retval != PAM_SUCCESS) |