summaryrefslogtreecommitdiff
path: root/sql/password.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2006-03-29 14:27:36 +0300
committermonty@mysql.com <>2006-03-29 14:27:36 +0300
commit1994ed49ecf09b9de26167a850915ef3de2a4ce6 (patch)
tree4d8a2c78f1c611f41d2ea762390198c528239c80 /sql/password.c
parent8cb3cf2382e9c8a3afb5d03ec4199e1ac4528bde (diff)
downloadmariadb-git-1994ed49ecf09b9de26167a850915ef3de2a4ce6.tar.gz
Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements Fixed some usage of not initialized variables (as found by valgrind) Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
Diffstat (limited to 'sql/password.c')
-rw-r--r--sql/password.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/password.c b/sql/password.c
index 506e1aa36a2..c6d904bc45b 100644
--- a/sql/password.c
+++ b/sql/password.c
@@ -323,7 +323,7 @@ void create_random_string(char *to, uint length, struct rand_struct *rand_st)
char *octet2hex(char *to, const char *str, uint len)
{
- const byte *str_end= str + len;
+ const char *str_end= str + len;
for (; str != str_end; ++str)
{
*to++= _dig_vec_upper[((uchar) *str) >> 4];
@@ -406,7 +406,7 @@ make_scrambled_password(char *to, const char *password)
mysql_sha1_result(&sha1_context, hash_stage2);
/* convert hash_stage2 to hex string */
*to++= PVERSION41_CHAR;
- octet2hex(to, hash_stage2, SHA1_HASH_SIZE);
+ octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE);
}
@@ -520,5 +520,5 @@ void get_salt_from_password(uint8 *hash_stage2, const char *password)
void make_password_from_salt(char *to, const uint8 *hash_stage2)
{
*to++= PVERSION41_CHAR;
- octet2hex(to, hash_stage2, SHA1_HASH_SIZE);
+ octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE);
}