diff options
author | unknown <serg@serg.mylan> | 2003-09-03 16:31:01 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-09-03 16:31:01 +0200 |
commit | d8572f2447c33fd46737aac9f7eaaa44fc8f1788 (patch) | |
tree | 07d9136ad04a386e819da89216ac0aa313378d85 /sql/password.c | |
parent | 1ef5dce8a7d406abed6c936d5ee5bc5ee286c254 (diff) | |
download | mariadb-git-d8572f2447c33fd46737aac9f7eaaa44fc8f1788.tar.gz |
C cleanups
Diffstat (limited to 'sql/password.c')
-rw-r--r-- | sql/password.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/password.c b/sql/password.c index 16227aab611..9f4910d8c60 100644 --- a/sql/password.c +++ b/sql/password.c @@ -170,15 +170,15 @@ void scramble_323(char *to, const char *message, const char *password) if (password && password[0]) { - char *to_start=to; + char extra, *to_start=to; + const char *message_end= message + SCRAMBLE_LENGTH_323; hash_password(hash_pass,password, strlen(password)); hash_password(hash_message, message, SCRAMBLE_LENGTH_323); randominit(&rand_st,hash_pass[0] ^ hash_message[0], hash_pass[1] ^ hash_message[1]); - const char *message_end= message + SCRAMBLE_LENGTH_323; for (; message < message_end; message++) *to++= (char) (floor(my_rnd(&rand_st)*31)+64); - char extra=(char) (floor(my_rnd(&rand_st)*31)); + extra=(char) (floor(my_rnd(&rand_st)*31)); while (to_start != to) *(to_start++)^=extra; } |