2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00

Avoid mixing declarations and code for non-C99 compilers.

This commit is contained in:
Todd C. Miller 2014-07-28 15:21:44 -06:00
parent 120f0684b5
commit 014edc20a3

View File

@ -782,9 +782,9 @@ command_matches_dir(const char *sudoers_dir, size_t dlen)
bool
hostname_matches(const char *shost, const char *lhost, const char *pattern)
{
debug_decl(hostname_matches, SUDO_DEBUG_MATCH)
const char *host;
bool rc;
debug_decl(hostname_matches, SUDO_DEBUG_MATCH)
host = strchr(pattern, '.') != NULL ? lhost : shost;
if (has_meta(pattern)) {