summaryrefslogtreecommitdiff
path: root/sql/password.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-04-04 15:41:50 +0200
committerSergei Golubchik <sergii@pisem.net>2012-04-04 15:41:50 +0200
commitc72d5e80c53c53a9a847b1c3b6ac66a7ad7eb815 (patch)
tree336038d788aee0f0f7955730e2e8827be8cba815 /sql/password.c
parent1ff3a106fb1e36ca4f3b0efdee9e644d73d01f92 (diff)
downloadmariadb-git-c72d5e80c53c53a9a847b1c3b6ac66a7ad7eb815.tar.gz
mdev-212 sporadic main.connect failures in 5.3
don't cast implicitly an int to a char, when a boolean value is desired.
Diffstat (limited to 'sql/password.c')
-rw-r--r--sql/password.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/password.c b/sql/password.c
index c8aa90aa56d..728d6ba700a 100644
--- a/sql/password.c
+++ b/sql/password.c
@@ -503,7 +503,7 @@ check_scramble(const char *scramble_arg, const char *message,
mysql_sha1_reset(&sha1_context);
mysql_sha1_input(&sha1_context, buf, SHA1_HASH_SIZE);
mysql_sha1_result(&sha1_context, hash_stage2_reassured);
- return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE);
+ return test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE));
}