diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-08-31 21:17:30 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-09-01 17:08:30 -0600 |
commit | ea408efe551ad837b08423f6d32b5433ab8dfe2b (patch) | |
tree | 0e8d7a4132d9973498e7746cefdfcfb3f97a386f /ldap/servers/plugins/pwdstorage/smd5_pwd.c | |
parent | 19c62472381cf72bc7bd20694bbd672edde7f94f (diff) | |
download | ds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.tar.gz ds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.tar.xz ds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.zip |
fix compiler warnings - unused vars/funcs, invalid casts
This commit fixes many compiler warnings, mostly for things like unused
variables, functions, goto labels.
One place was using csngen_free instead of csn_free. A couple of places
were using casts incorrectly, and several places needed some casts added.
Tested on: RHEL5 x86_64, Fedora 14 x86_64
Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'ldap/servers/plugins/pwdstorage/smd5_pwd.c')
-rw-r--r-- | ldap/servers/plugins/pwdstorage/smd5_pwd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ldap/servers/plugins/pwdstorage/smd5_pwd.c b/ldap/servers/plugins/pwdstorage/smd5_pwd.c index cef3ee37..48baa24b 100644 --- a/ldap/servers/plugins/pwdstorage/smd5_pwd.c +++ b/ldap/servers/plugins/pwdstorage/smd5_pwd.c @@ -66,8 +66,8 @@ smd5_pw_cmp( const char *userpwd, const char *dbpwd ) unsigned int outLen; unsigned char userhash[MD5_LENGTH]; int hash_len; - unsigned char quick_dbhash[MD5_LENGTH + MD5_DEFAULT_SALT_LENGTH + 1]; - unsigned char *dbhash = quick_dbhash; + char quick_dbhash[MD5_LENGTH + MD5_DEFAULT_SALT_LENGTH + 1]; + char *dbhash = quick_dbhash; struct berval salt; char *hashresult = NULL; @@ -83,7 +83,7 @@ smd5_pw_cmp( const char *userpwd, const char *dbpwd ) */ hash_len = pwdstorage_base64_decode_len(dbpwd, 0); if ( hash_len >= sizeof(quick_dbhash) ) { /* get more space: */ - dbhash = (unsigned char*) slapi_ch_calloc( hash_len + 1, sizeof(char) ); + dbhash = (char*) slapi_ch_calloc( hash_len + 1, sizeof(char) ); if ( dbhash == NULL ) goto loser; } else { memset( quick_dbhash, 0, sizeof(quick_dbhash) ); |