aboutsummaryrefslogtreecommitdiff
path: root/filter.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-04-25 13:42:07 +0200
committerPetr Machata <pmachata@redhat.com>2012-04-25 13:42:07 +0200
commitcc0e1e4b83d69441cc5f61ea87eda5458ee9fae3 (patch)
tree38378e9ba7fc871111c488c5e2bdee9dc06a2407 /filter.c
parentfd2641c0d27705c89d224e3205b1296110b6598c (diff)
downloadltrace-cc0e1e4b83d69441cc5f61ea87eda5458ee9fae3.tar.gz
Replace some uses of error with fprintf
error is not standard so it has no business being used in generic code. The linux-gnu back end is useful for android, and that doesn't have that interface either.
Diffstat (limited to 'filter.c')
-rw-r--r--filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/filter.c b/filter.c
index b4fa330..003010d 100644
--- a/filter.c
+++ b/filter.c
@@ -19,8 +19,9 @@
*/
#include <stdlib.h>
-#include <error.h>
#include <assert.h>
+#include <stdio.h>
+#include <string.h>
#include "filter.h"
#include "library.h"
@@ -117,7 +118,7 @@ re_match_or_error(regex_t *re, const char *name, const char *what)
char buf[200];
regerror(status, re, buf, sizeof buf);
- error(0, 0, "Error when matching %s: %s", name, buf);
+ fprintf(stderr, "Error when matching %s: %s\n", name, buf);
return 0;
}