Skip to content

Commit 18123e3

Browse files
committed
validate_hostname: Don't initialize ret, it is set immediately
Initializing ret to MatchFound makes it appear that the default return value is MatchFound, which is not correct.
1 parent 930a087 commit 18123e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/iolog/hostcheck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ matches_subject_alternative_name(const char *hostname, const char *ipaddr,
256256
HostnameValidationResult
257257
validate_hostname(X509 *cert, const char *hostname, const char *ipaddr)
258258
{
259-
HostnameValidationResult ret = MatchFound;
259+
HostnameValidationResult ret;
260260
debug_decl(validate_hostname, SUDO_DEBUG_UTIL);
261261

262262
/* Check SAN first if exists */

0 commit comments

Comments
 (0)