silence warnings

This commit is contained in:
Nikos Mavrogiannopoulos
2013-07-06 11:45:22 +02:00
parent 2fce51004b
commit 531b457c64

View File

@@ -121,12 +121,11 @@ unsigned j;
READ_MULTI_LINE("auth", auth, auth_size, 1);
for (j=0;j<auth_size;j++) {
if (strcasecmp(auth[j], "pam") == 0) {
if (config->auth_types & AUTH_TYPE_USERNAME_PASS != 0) {
if ((config->auth_types & AUTH_TYPE_USERNAME_PASS) != 0) {
fprintf(stderr, "You cannot mix multiple username/password authentication methods\n");
exit(1);
}
#ifdef HAVE_PAM
config->auth_types |= AUTH_TYPE_USERNAME_PASS;
config->auth_types |= AUTH_TYPE_PAM;
#else
fprintf(stderr, "PAM support is disabled\n");
@@ -135,7 +134,7 @@ unsigned j;
} else if (strncasecmp(auth[j], "plain[", 6) == 0) {
char* p;
if (config->auth_types & AUTH_TYPE_USERNAME_PASS != 0) {
if ((config->auth_types & AUTH_TYPE_USERNAME_PASS) != 0) {
fprintf(stderr, "You cannot mix multiple username/password authentication methods\n");
exit(1);
}
@@ -147,7 +146,6 @@ unsigned j;
exit(1);
}
*p = 0;
config->auth_types |= AUTH_TYPE_USERNAME_PASS;
config->auth_types |= AUTH_TYPE_PLAIN;
} else if (strcasecmp(auth[j], "certificate") == 0) {
config->auth_types |= AUTH_TYPE_CERTIFICATE;