Format match_hostname().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@716 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-05-05 07:15:06 +00:00
parent 5c934d0970
commit 4c78793961

View File

@@ -178,9 +178,11 @@ static int match_pattern_list(const char *string, const char *pattern,
/* /*
* Tries to match the host name (which must be in all lowercase) against the * Tries to match the host name (which must be in all lowercase) against the
* comma-separated sequence of subpatterns (each possibly preceded by ! to * comma-separated sequence of subpatterns (each possibly preceded by ! to
* indicate negation). Returns -1 if negation matches, 1 if there is * indicate negation).
* a positive match, 0 if there is no match at all. * Returns -1 if negation matches, 1 if there is a positive match, 0 if there
* is no match at all.
*/ */
int match_hostname(const char *host, const char *pattern, unsigned int len) { int match_hostname(const char *host, const char *pattern, unsigned int len) {
return match_pattern_list(host, pattern, len, 1); return match_pattern_list(host, pattern, len, 1);
} }