mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Avoid mixing declarations and code for non-C99 compilers.
This commit is contained in:
parent
120f0684b5
commit
014edc20a3
@ -782,9 +782,9 @@ command_matches_dir(const char *sudoers_dir, size_t dlen)
|
|||||||
bool
|
bool
|
||||||
hostname_matches(const char *shost, const char *lhost, const char *pattern)
|
hostname_matches(const char *shost, const char *lhost, const char *pattern)
|
||||||
{
|
{
|
||||||
debug_decl(hostname_matches, SUDO_DEBUG_MATCH)
|
|
||||||
const char *host;
|
const char *host;
|
||||||
bool rc;
|
bool rc;
|
||||||
|
debug_decl(hostname_matches, SUDO_DEBUG_MATCH)
|
||||||
|
|
||||||
host = strchr(pattern, '.') != NULL ? lhost : shost;
|
host = strchr(pattern, '.') != NULL ? lhost : shost;
|
||||||
if (has_meta(pattern)) {
|
if (has_meta(pattern)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user