diff options
author | kn <kn@cvs.openbsd.org> | 2018-09-07 19:56:08 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2018-09-07 19:56:08 +0000 |
commit | 87d5ad54b052a74580f8f53768b4cf0267c70dd9 (patch) | |
tree | 63bcf4a5d2be43fc288a90c273592003f375560a | |
parent | 525da14aa9c001fd67d85927b4d6a576dcba6fc5 (diff) |
Fix function name in error messages by using __func__
-rw-r--r-- | sbin/pfctl/pfctl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 713b84b4f6d..90d01fb598b 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.356 2018/07/20 11:16:55 kn Exp $ */ +/* $OpenBSD: pfctl.c,v 1.357 2018/09/07 19:56:07 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1612,19 +1612,17 @@ pfctl_rules(int dev, char *filename, int opts, int optimize, rs->anchor = pf.anchor; if (strlcpy(pf.anchor->path, anchorname, sizeof(pf.anchor->path)) >= sizeof(pf.anchor->path)) - errx(1, "pfctl_add_rule: strlcpy"); + errx(1, "%s: strlcpy", __func__); if ((p = strrchr(anchorname, '/')) != NULL) { if (strlen(p) == 1) - errx(1, "pfctl_add_rule: bad anchor name %s", - anchorname); + errx(1, "%s: bad anchor name %s", __func__, anchorname); } else p = anchorname; if (strlcpy(pf.anchor->name, p, sizeof(pf.anchor->name)) >= sizeof(pf.anchor->name)) - errx(1, "pfctl_add_rule: strlcpy"); - + errx(1, "%s: strlcpy", __func__); pf.astack[0] = pf.anchor; pf.asd = 0; |