diff options
author | monty@mysql.com <> | 2006-06-19 12:45:34 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2006-06-19 12:45:34 +0300 |
commit | 860661a2dc5905396f1e6ee4b163bdf29dc2b6fe (patch) | |
tree | b1eef84ec3b6195237d928b1ebea0aaa0acf90a7 /sql/sql_crypt.cc | |
parent | 37d7bbb335fd3d3c578a724790ce5f5cbc049ce9 (diff) | |
download | mariadb-git-860661a2dc5905396f1e6ee4b163bdf29dc2b6fe.tar.gz |
unsigned char -> uchar
Added missing copyright
Indentation and prototype fixes
Fixed compiler warning
Diffstat (limited to 'sql/sql_crypt.cc')
-rw-r--r-- | sql/sql_crypt.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc index f21a109e95d..4e73941fb49 100644 --- a/sql/sql_crypt.cc +++ b/sql/sql_crypt.cc @@ -52,7 +52,7 @@ void SQL_CRYPT::crypt_init(ulong *rand_nr) decode_buff[+i]=a; } for (i=0 ; i <= 255 ; i++) - encode_buff[(unsigned char) decode_buff[i]]=i; + encode_buff[(uchar) decode_buff[i]]=i; org_rand=rand; shift=0; } @@ -75,7 +75,7 @@ void SQL_CRYPT::decode(char *str,uint length) for (uint i=0; i < length; i++) { shift^=(uint) (my_rnd(&rand)*255.0); - uint idx= (uint) ((unsigned char) str[0] ^ shift); + uint idx= (uint) ((uchar) str[0] ^ shift); *str = decode_buff[idx]; shift^= (uint) (uchar) *str++; } |