summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--match.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/match.c b/match.c
index 3cf40306b..a7585e2bd 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.c,v 1.37 2017/03/10 04:24:55 djm Exp $ */ 1/* $OpenBSD: match.c,v 1.36 2017/03/10 03:52:48 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -42,11 +42,9 @@
42#include <ctype.h> 42#include <ctype.h>
43#include <stdlib.h> 43#include <stdlib.h>
44#include <string.h> 44#include <string.h>
45#include <stdio.h>
46 45
47#include "xmalloc.h" 46#include "xmalloc.h"
48#include "match.h" 47#include "match.h"
49#include "misc.h"
50 48
51/* 49/*
52 * Returns true if the given string matches the pattern (which may contain ? 50 * Returns true if the given string matches the pattern (which may contain ?
@@ -179,13 +177,7 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
179int 177int
180match_hostname(const char *host, const char *pattern) 178match_hostname(const char *host, const char *pattern)
181{ 179{
182 char *hostcopy = xstrdup(host); 180 return match_pattern_list(host, pattern, 1);
183 int r;
184
185 lowercase(hostcopy);
186 r = match_pattern_list(hostcopy, pattern, 1);
187 free(hostcopy);
188 return r;
189} 181}
190 182
191/* 183/*