diff options
author | Ken Raeburn <raeburn@mit.edu> | 2009-02-02 23:41:40 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2009-02-02 23:41:40 +0000 |
commit | d431a41a7a0f44ff2d0e5c69fb8a6901f72d0b55 (patch) | |
tree | e4f6373671367a5afb16e2cc1e4bbbf44ab015b7 /src/plugins/kdb | |
parent | 2fbe8a9edf3b69e68c226a79dad0747f19decd0b (diff) | |
download | krb5-d431a41a7a0f44ff2d0e5c69fb8a6901f72d0b55.zip krb5-d431a41a7a0f44ff2d0e5c69fb8a6901f72d0b55.tar.gz krb5-d431a41a7a0f44ff2d0e5c69fb8a6901f72d0b55.tar.bz2 |
Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except unicode, windows code
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb')
-rw-r--r-- | src/plugins/kdb/db2/kdb_db2.c | 8 | ||||
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c | 4 | ||||
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c | 2 | ||||
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c | 4 | ||||
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c index 8582809..a947f2b 100644 --- a/src/plugins/kdb/db2/kdb_db2.c +++ b/src/plugins/kdb/db2/kdb_db2.c @@ -180,7 +180,7 @@ k5db2_clear_context(krb5_db2_context *dbctx) /* * Clear the structure and reset the defaults. */ - memset((char *) dbctx, 0, sizeof(krb5_db2_context)); + memset(dbctx, 0, sizeof(krb5_db2_context)); dbctx->db_name = default_db_name; dbctx->db_nb_locks = FALSE; dbctx->tempdb = FALSE; @@ -199,7 +199,7 @@ k5db2_init_context(krb5_context context) if (db_ctx == NULL) return ENOMEM; else { - memset((char *) db_ctx, 0, sizeof(krb5_db2_context)); + memset(db_ctx, 0, sizeof(krb5_db2_context)); k5db2_clear_context((krb5_db2_context *) db_ctx); dal_handle->db_context = (void *) db_ctx; } @@ -1113,7 +1113,7 @@ krb5_db2_db_delete_principal(krb5_context context, case 0: ; } - memset((char *) &entry, 0, sizeof(entry)); + memset(&entry, 0, sizeof(entry)); contdata.data = contents.data; contdata.length = contents.size; retval = krb5_decode_princ_contents(context, &contdata, &entry); @@ -1124,7 +1124,7 @@ krb5_db2_db_delete_principal(krb5_context context, /* Clear encrypted key contents */ for (i = 0; i < entry.n_key_data; i++) { if (entry.key_data[i].key_data_length[0]) { - memset((char *) entry.key_data[i].key_data_contents[0], 0, + memset(entry.key_data[i].key_data_contents[0], 0, (unsigned) entry.key_data[i].key_data_length[0]); } } diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c index 08a87fe..4b8fcb2 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c @@ -121,8 +121,8 @@ krb5_ldap_read_startup_information(krb5_context context) || ((mask & LDAP_REALM_KRBTICKETFLAGS) == 0)) { kadm5_config_params params_in, params_out; - memset((char *) ¶ms_in, 0, sizeof(params_in)); - memset((char *) ¶ms_out, 0, sizeof(params_out)); + memset(¶ms_in, 0, sizeof(params_in)); + memset(¶ms_out, 0, sizeof(params_out)); retval = kadm5_get_config_params(context, 1, ¶ms_in, ¶ms_out); if (retval) { diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c index 6a9c6b6..5b9fa5c 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c @@ -86,7 +86,7 @@ krb5_ldap_read_krbcontainer_params(krb5_context context, cparams =(krb5_ldap_krbcontainer_params *) malloc(sizeof(krb5_ldap_krbcontainer_params)); CHECK_NULL(cparams); - memset((char *) cparams, 0, sizeof(krb5_ldap_krbcontainer_params)); + memset(cparams, 0, sizeof(krb5_ldap_krbcontainer_params)); /* read kerberos containter location from [dbmodules] section of krb5.conf file */ if (ldap_context->conf_section) { diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c index d41ffa3..e02a51a 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c @@ -1224,7 +1224,7 @@ krb5_ldap_read_realm_params(context, lrealm, rlparamp, mask) /* Initialize realm container structure */ rlparams =(krb5_ldap_realm_params *) malloc(sizeof(krb5_ldap_realm_params)); CHECK_NULL(rlparams); - memset((char *) rlparams, 0, sizeof(krb5_ldap_realm_params)); + memset(rlparams, 0, sizeof(krb5_ldap_realm_params)); /* allocate tl_data structure to store MASK information */ rlparams->tl_data = malloc (sizeof(krb5_tl_data)); @@ -1232,7 +1232,7 @@ krb5_ldap_read_realm_params(context, lrealm, rlparamp, mask) st = ENOMEM; goto cleanup; } - memset((char *) rlparams->tl_data, 0, sizeof(krb5_tl_data)); + memset(rlparams->tl_data, 0, sizeof(krb5_tl_data)); rlparams->tl_data->tl_data_type = KDB_TL_USER_INFO; /* set the mask parameter to 0 */ diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c index 3c2fbac..b799756 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c @@ -132,7 +132,7 @@ krb5_ldap_readpassword(context, ldap_context, password) st = ENOMEM; goto rp_exit; } - memcpy((char *)(*password), start, len); + memcpy(*password, start, len); (*password)[len] = '\0'; (*password)[len + 1] = '\0'; goto got_password; |