aboutsummaryrefslogtreecommitdiff
path: root/glob.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-11-09 16:42:36 +0100
committerPetr Machata <pmachata@redhat.com>2012-11-09 16:42:36 +0100
commit03be6eb89a1d05cf39e9278e0b0813ead3787519 (patch)
tree06373e6bb8be02704a5829a237317912b64f798c /glob.c
parent28cd84db222ce68ad13c6d37dfed5f3bb0a44784 (diff)
downloadltrace-03be6eb89a1d05cf39e9278e0b0813ead3787519.tar.gz
In globcomp, use REG_NOERROR instead of literal 0
Hopefully this will make it clearer that the protocol is different than everywhere else in ltrace, where <0 is error condition.
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 9b7123e..9c0a597 100644
--- a/glob.c
+++ b/glob.c
@@ -179,7 +179,7 @@ glob_to_regex(const char *glob, char **retp)
goto fail;
}
*retp = buf;
- return 0;
+ return REG_NOERROR;
}
int
@@ -187,7 +187,7 @@ globcomp(regex_t *preg, const char *glob, int cflags)
{
char *regex;
int status = glob_to_regex(glob, &regex);
- if (status != 0)
+ if (status != REG_NOERROR)
return status;
status = regcomp(preg, regex, cflags);
free(regex);