Avoid some type casts
Submitted on tech-pkg@ as: [PATCH 03/11] Avoid some type casts No functional change intended.
This commit is contained in:
parent
5a96e50edf
commit
e1d90c495a
|
@ -57,7 +57,7 @@
|
|||
|
||||
#if defined(__NetBSD__)
|
||||
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
|
||||
__RCSID("$NetBSD: keyring.c,v 1.51 2017/02/20 00:51:08 khorben Exp $");
|
||||
__RCSID("$NetBSD: keyring.c,v 1.52 2017/03/27 20:55:13 khorben Exp $");
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
|
@ -214,7 +214,7 @@ pgp_get_writable_seckey(pgp_key_t *data)
|
|||
|
||||
/* utility function to zero out memory */
|
||||
void
|
||||
pgp_forget(void *vp, unsigned size)
|
||||
pgp_forget(void *vp, size_t size)
|
||||
{
|
||||
(void) memset(vp, 0x0, size);
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ decrypt_cb(const pgp_packet_t *pkt, pgp_cbdata_t *cbinfo)
|
|||
case PGP_GET_PASSPHRASE:
|
||||
(void) pgp_getpassphrase(decrypt->passfp, pass, sizeof(pass));
|
||||
*content->skey_passphrase.passphrase = netpgp_strdup(pass);
|
||||
pgp_forget(pass, (unsigned)sizeof(pass));
|
||||
pgp_forget(pass, sizeof(pass));
|
||||
return PGP_KEEP_MEMORY;
|
||||
|
||||
case PGP_PARSER_ERRCODE:
|
||||
|
|
|
@ -100,7 +100,7 @@ int pgp_keyring_list(pgp_io_t *, const pgp_keyring_t *, const int);
|
|||
int pgp_keyring_json(pgp_io_t *, const pgp_keyring_t *, mj_t *, const int);
|
||||
|
||||
void pgp_set_seckey(pgp_contents_t *, const pgp_key_t *);
|
||||
void pgp_forget(void *, unsigned);
|
||||
void pgp_forget(void *, size_t);
|
||||
|
||||
const uint8_t *pgp_get_key_id(const pgp_key_t *);
|
||||
unsigned pgp_get_userid_count(const pgp_key_t *);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#if defined(__NetBSD__)
|
||||
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
|
||||
__RCSID("$NetBSD: netpgp.c,v 1.100 2017/02/24 01:26:17 khorben Exp $");
|
||||
__RCSID("$NetBSD: netpgp.c,v 1.101 2017/03/27 20:55:13 khorben Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -1411,7 +1411,7 @@ netpgp_sign_file(netpgp_t *netpgp,
|
|||
(unsigned)armored, (unsigned)cleartext,
|
||||
overwrite);
|
||||
}
|
||||
pgp_forget(seckey, (unsigned)sizeof(*seckey));
|
||||
pgp_forget(seckey, sizeof(*seckey));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ netpgp_sign_memory(netpgp_t *netpgp,
|
|||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
pgp_forget(seckey, (unsigned)sizeof(*seckey));
|
||||
pgp_forget(seckey, sizeof(*seckey));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue