mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
better use ERR than fprintf for error messages
This commit is contained in:
parent
a56e13d770
commit
07e46d2fc0
@ -38,6 +38,7 @@
|
||||
#include "util.h"
|
||||
#include "list.h"
|
||||
#include "conf.h"
|
||||
#include "log.h"
|
||||
|
||||
extern int maxcols;
|
||||
extern config_t *config;
|
||||
@ -195,7 +196,7 @@ int reg_match(char *string, char *pattern)
|
||||
regex_t reg;
|
||||
|
||||
if(regcomp(®, pattern, REG_EXTENDED | REG_NOSUB | REG_ICASE) != 0) {
|
||||
fprintf(stderr, "error: %s is not a valid regular expression.\n", pattern);
|
||||
ERR(NL, "%s is not a valid regular expression.\n", pattern);
|
||||
return(-1);
|
||||
}
|
||||
result = regexec(®, string, 0, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user