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.
diff --git a/glob.c b/glob.c
index 9b7123e..9c0a597 100644
--- a/glob.c
+++ b/glob.c
@@ -179,7 +179,7 @@
goto fail;
}
*retp = buf;
- return 0;
+ return REG_NOERROR;
}
int
@@ -187,7 +187,7 @@
{
char *regex;
int status = glob_to_regex(glob, ®ex);
- if (status != 0)
+ if (status != REG_NOERROR)
return status;
status = regcomp(preg, regex, cflags);
free(regex);
diff --git a/options.c b/options.c
index 004f322..a63ed28 100644
--- a/options.c
+++ b/options.c
@@ -204,7 +204,7 @@
regex_t lib_re;
int status = (lib_re_p ? regcomp : globcomp)(&lib_re, lib, 0);
- if (status != 0) {
+ if (status != REG_NOERROR) {
char buf[100];
regerror(status, &lib_re, buf, sizeof buf);
fprintf(stderr, "Rule near '%s' will be ignored: %s.\n",