Merge pull request #168 from likunyur/lky

Remove unnecessary initialization and casts.
This commit is contained in:
Todd C. Miller
2022-08-02 13:40:16 -06:00
2 changed files with 3 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ matches_common_name(const char *hostname, const char *ipaddr, const X509 *cert,
{
X509_NAME_ENTRY *common_name_entry = NULL;
ASN1_STRING *common_name_asn1 = NULL;
int common_name_loc = -1;
int common_name_loc;
debug_decl(matches_common_name, SUDO_DEBUG_UTIL);
/* Find the position of the CN field in the Subject field of the certificate */
@@ -268,7 +268,7 @@ matches_subject_alternative_name(const char *hostname, const char *ipaddr, const
{
HostnameValidationResult result = MatchNotFound;
int i;
int san_names_nb = -1;
int san_names_nb;
STACK_OF(GENERAL_NAME) *san_names = NULL;
debug_decl(matches_subject_alternative_name, SUDO_DEBUG_UTIL);

View File

@@ -150,7 +150,7 @@ _rs_rekey(unsigned char *dat, size_t datlen)
static inline void
_rs_random_buf(void *_buf, size_t n)
{
unsigned char *buf = (unsigned char *)_buf;
unsigned char *buf = _buf;
unsigned char *keystream;
size_t m;