From owner-svn-src-head@freebsd.org Sun Apr 16 04:36:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E8AD40EC2; Sun, 16 Apr 2017 04:36:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 279D5355; Sun, 16 Apr 2017 04:36:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3G4aM3S011471; Sun, 16 Apr 2017 04:36:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3G4aMtX011469; Sun, 16 Apr 2017 04:36:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704160436.v3G4aMtX011469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 16 Apr 2017 04:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316997 - in head/contrib/ipfilter: lib tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2017 04:36:23 -0000 Author: cy Date: Sun Apr 16 04:36:22 2017 New Revision: 316997 URL: https://svnweb.freebsd.org/changeset/base/316997 Log: Use warnx() to issue error message. Reported by: cem MFC after: 1 week X-MFC with: r316993, r316994 Modified: head/contrib/ipfilter/lib/parsefields.c head/contrib/ipfilter/tools/ipf_y.y Modified: head/contrib/ipfilter/lib/parsefields.c ============================================================================== --- head/contrib/ipfilter/lib/parsefields.c Sun Apr 16 03:49:14 2017 (r316996) +++ head/contrib/ipfilter/lib/parsefields.c Sun Apr 16 04:36:22 2017 (r316997) @@ -1,4 +1,5 @@ #include "ipf.h" +#include 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(); } } Modified: head/contrib/ipfilter/tools/ipf_y.y ============================================================================== --- head/contrib/ipfilter/tools/ipf_y.y Sun Apr 16 03:49:14 2017 (r316996) +++ head/contrib/ipfilter/tools/ipf_y.y Sun Apr 16 04:36:22 2017 (r316997) @@ -9,6 +9,7 @@ #include "ipf.h" #include #include +#include #ifdef IPFILTER_BPF # include #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);