diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2017-04-16 04:36:22 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2017-04-16 04:36:22 +0000 |
| commit | c6fd01fbbbf09a3b57e4ba79c4db2c1bf00165b0 (patch) | |
| tree | fccf183c9899c0adf057fb030c9bbee8d912915b /contrib | |
| parent | 44c63714ce236888220e1600fc0fb3720fe29e4a (diff) | |
Notes
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/ipfilter/lib/parsefields.c | 3 | ||||
| -rw-r--r-- | contrib/ipfilter/tools/ipf_y.y | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/contrib/ipfilter/lib/parsefields.c b/contrib/ipfilter/lib/parsefields.c index 4d79078a905cd..93c3601c95577 100644 --- a/contrib/ipfilter/lib/parsefields.c +++ b/contrib/ipfilter/lib/parsefields.c @@ -1,4 +1,5 @@ #include "ipf.h" +#include <err.h> extern int nohdrfields; @@ -33,7 +34,7 @@ wordtab_t *parsefields(table, arg) } else { fields = reallocarray(fields, num + 1, sizeof(*fields)); if (fields == NULL) { - perror("memory allocation error at __LINE__ in __FUNCTIOIN__ in __FILE__"); + warnx("memory allocation error at %d in %s in %s", __LINE__, __FUNCTION__, __FILE__); abort(); } } diff --git a/contrib/ipfilter/tools/ipf_y.y b/contrib/ipfilter/tools/ipf_y.y index fc48844343472..26db2a22e45ed 100644 --- a/contrib/ipfilter/tools/ipf_y.y +++ b/contrib/ipfilter/tools/ipf_y.y @@ -9,6 +9,7 @@ #include "ipf.h" #include <sys/ioctl.h> #include <syslog.h> +#include <err.h> #ifdef IPFILTER_BPF # include <pcap.h> #endif @@ -2196,7 +2197,7 @@ char *phrase; s = strtok(NULL, " \r\n\t"), i++) { fb = reallocarray(fb, i / 4 + 1, sizeof(*fb)); if (fb == NULL) { - perror("memory allocation error at __LINE__ in __FUNCTION__ in __FILE"); + warnx("memory allocation error at %d in %s in %s", __LINE__, __FUNCTION__, __FILE__); abort(); } l = (u_32_t)strtol(s, NULL, 0); |
