diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-04 18:00:15 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-05 22:18:59 -0400 |
commit | 16f8d4ebf0fd4847fa83d9c61f4150273cb4f533 (patch) | |
tree | 3c30094cad38433c24008c30efe3d93cf38d8ae9 /ssl/kssl.c | |
parent | 12048657a91b12e499d03ec9ff406b42aba67366 (diff) |
memset, memcpy, sizeof consistency fixes
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr)
for memset and memcpy. Remove needless casts for those functions.
For memset, replace alternative forms of zero with 0.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/kssl.c')
-rw-r--r-- | ssl/kssl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssl/kssl.c b/ssl/kssl.c index ce43529161..d781042247 100644 --- a/ssl/kssl.c +++ b/ssl/kssl.c @@ -1048,7 +1048,7 @@ krb5_error_code kssl_cget_tkt( /* UPDATE */ KSSL_CTX *kssl_ctx, krb5_data krb5_app_req; kssl_err_set(kssl_err, 0, ""); - memset((char *)&krb5creds, 0, sizeof(krb5creds)); + memset(&krb5creds, 0, sizeof(krb5creds)); if (!kssl_ctx) { kssl_err_set(kssl_err, SSL_R_KRB5_S_INIT, "No kssl_ctx defined.\n"); @@ -1797,7 +1797,7 @@ int kssl_tgt_is_available(KSSL_CTX *kssl_ctx) krb5_creds krb5creds, *krb5credsp = NULL; int rc = 0; - memset((char *)&krb5creds, 0, sizeof(krb5creds)); + memset(&krb5creds, 0, sizeof(krb5creds)); if (!kssl_ctx) return (0); @@ -2072,7 +2072,7 @@ krb5_error_code kssl_check_authent( } # endif enc = kssl_map_enc(enctype); - memset(iv, 0, sizeof iv); /* per RFC 1510 */ + memset(iv, 0, sizeof(iv)); /* per RFC 1510 */ if (enc == NULL) { /* @@ -2126,7 +2126,7 @@ krb5_error_code kssl_check_authent( goto err; } - memset(&tm_time, 0, sizeof(struct tm)); + memset(&tm_time, 0, sizeof(tm_tmime)); if (k_gmtime(auth->ctime, &tm_time) && ((tr = mktime(&tm_time)) != (time_t)(-1))) { now = time(&now); |