summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/server/src/server-helpers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 381fb6f515e..e6def55c745 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -1282,19 +1282,19 @@ auth_set_username_passwd (dict_t *input_params, dict_t *config_params,
goto out;
}
- ret = !((strcmp (data_to_str (passwd_data),
- password))?0: -1);
+ ret = strcmp (data_to_str (passwd_data),
+ password);
if (!ret) {
client->auth.username =
gf_strdup (username);
client->auth.passwd =
gf_strdup (password);
- }
- if (ret == -1)
+ } else {
gf_msg ("auth/login", GF_LOG_ERROR, 0,
PS_MSG_LOGIN_ERROR, "wrong "
"password for user %s",
username);
+ }
break;
}
username_str = strtok_r (NULL, " ,", &tmp);