summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-18 15:40:13 +0000
committerJim Meyering <jim@meyering.net>2003-03-18 15:40:13 +0000
commit5f3bedb89aec1aaac867f1d92df1475904266698 (patch)
treec093ae516954d33fa007828515048e1659f0b8b8 /lib
parent336a1e2dad2afceafc9cd65f22b50663b0cd3620 (diff)
downloadcoreutils-5f3bedb89aec1aaac867f1d92df1475904266698.tar.xz
(excluded_filename): Define and use typedef to
avoid type mismatch in conditional expression.
Diffstat (limited to 'lib')
-rw-r--r--lib/exclude.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/exclude.c b/lib/exclude.c
index 9337e74a9..565e2458d 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -1,6 +1,6 @@
/* exclude.c -- exclude file names
- Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002 Free
+ Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -173,9 +173,11 @@ excluded_filename (struct exclude const *ex, char const *f)
int options = exclude[i].options;
if (excluded == !! (options & EXCLUDE_INCLUDE))
{
- int (*matcher) PARAMS ((char const *, char const *, int)) =
+ typedef int (*fnmatch_t)
+ PARAMS ((char const *, char const *, int));
+ fnmatch_t matcher =
(options & EXCLUDE_WILDCARDS
- ? fnmatch
+ ? (fnmatch_t) fnmatch
: fnmatch_no_wildcards);
bool matched = ((*matcher) (pattern, f, options) == 0);
char const *p;