Lines Matching defs:pattern
335 static int match_host_pattern(const char *pattern, const char *hostname)
338 if (!strcmp(pattern, "*"))
340 // Skip a possible *. at the start of the pattern
341 if (pattern[0] == '*')
342 pattern++;
343 if (pattern[0] == '.')
344 pattern++;
345 len_p = strlen(pattern);
349 // Simply check if the end of hostname is equal to 'pattern'
350 if (!strcmp(pattern, &hostname[len_h - len_p])) {