1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-20 12:54:16 +01:00

calculate size of cfg array

This commit is contained in:
Klas Lindfors 2015-01-19 09:28:55 +01:00
parent 8366721fd1
commit aae9a9add5

View File

@ -49,7 +49,7 @@ int test_authenticate1(void) {
"authfile=aux/authfile", "authfile=aux/authfile",
"debug", "debug",
}; };
return pam_sm_authenticate(1, 0, 4, cfg); return pam_sm_authenticate(1, 0, sizeof(cfg) / sizeof(char*), cfg);
} }
int test_authenticate2(void) { int test_authenticate2(void) {
@ -59,7 +59,7 @@ int test_authenticate2(void) {
"authfile=aux/authfile", "authfile=aux/authfile",
"debug", "debug",
}; };
return pam_sm_authenticate(2, 0, 4, cfg); return pam_sm_authenticate(2, 0, sizeof(cfg) / sizeof(char*), cfg);
} }
const char * pam_strerror(pam_handle_t *pamh, int errnum) { const char * pam_strerror(pam_handle_t *pamh, int errnum) {