diff --git a/lib/iolog/hostcheck.c b/lib/iolog/hostcheck.c index 95c14d059..d23514e8b 100644 --- a/lib/iolog/hostcheck.c +++ b/lib/iolog/hostcheck.c @@ -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); diff --git a/lib/util/arc4random.c b/lib/util/arc4random.c index fa892fb60..a51791928 100644 --- a/lib/util/arc4random.c +++ b/lib/util/arc4random.c @@ -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;