summaryrefslogtreecommitdiff
path: root/lib/libc/gen/fnmatch.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-03-19 00:30:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-03-19 00:30:11 +0000
commit5643391d32d8965e97def2dc4d0e58bb24060bc0 (patch)
treeb20a3fb1d2e6123a59938792d862e7b5c5ef5e59 /lib/libc/gen/fnmatch.c
parent8aee2c24aa2e8e4e5f36756d400b1fa2a0499ab3 (diff)
some -Wall
Diffstat (limited to 'lib/libc/gen/fnmatch.c')
-rw-r--r--lib/libc/gen/fnmatch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c
index 5063ff36a44..acb6047b7fd 100644
--- a/lib/libc/gen/fnmatch.c
+++ b/lib/libc/gen/fnmatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fnmatch.c,v 1.5 1997/09/22 05:03:30 millert Exp $ */
+/* $OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
#else
-static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.5 1997/09/22 05:03:30 millert Exp $";
+static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -100,14 +100,14 @@ fnmatch(pattern, string, flags)
return (FNM_NOMATCH);
/* Optimize for pattern with * at end or before /. */
- if (c == EOS)
+ if (c == EOS) {
if (flags & FNM_PATHNAME)
return ((flags & FNM_LEADING_DIR) ||
strchr(string, '/') == NULL ?
0 : FNM_NOMATCH);
else
return (0);
- else if (c == '/' && (flags & FNM_PATHNAME)) {
+ } else if (c == '/' && (flags & FNM_PATHNAME)) {
if ((string = strchr(string, '/')) == NULL)
return (FNM_NOMATCH);
break;