aboutsummaryrefslogtreecommitdiff
path: root/glob.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-12-08 03:23:39 +0100
committerPetr Machata <pmachata@redhat.com>2012-12-10 11:48:59 +0100
commitb6c5c8c51f954cfbe76424fd57c33a87166f0545 (patch)
treeb960a7965c5d0ff1810cb6dfa16be55f2faf1c13 /glob.c
parent91be87822a57bf4fb606333d5a7903dec9f56420 (diff)
downloadltrace-b6c5c8c51f954cfbe76424fd57c33a87166f0545.tar.gz
Avoid using REG_NOERROR
Not all systems define this (IRIX 6.5 doesn't). Comparing to 0 is not terribly less readable, so do that instead.
Diffstat (limited to 'glob.c')
-rw-r--r--glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glob.c b/glob.c
index 9af633f..b26637f 100644
--- a/glob.c
+++ b/glob.c
@@ -180,7 +180,7 @@ glob_to_regex(const char *glob, char **retp)
goto fail;
}
*retp = buf;
- return REG_NOERROR;
+ return 0;
}
int
@@ -188,7 +188,7 @@ globcomp(regex_t *preg, const char *glob, int cflags)
{
char *regex = NULL;
int status = glob_to_regex(glob, &regex);
- if (status != REG_NOERROR)
+ if (status != 0)
return status;
assert(regex != NULL);
status = regcomp(preg, regex, cflags);