agname)) - errx(1, "expand_rule: strlcpy"); + errx(1, "%s: strlcpy", __func__); osrch = odsth = NULL; if (src_host->addr.type == PF_ADDR_DYNIFTL) { osrch = src_host; if ((src_host = gen_dynnode(src_host, r->af)) == NULL) - err(1, "expand_rule: calloc"); + err(1, "%s: calloc", __func__); } if (dst_host->addr.type == PF_ADDR_DYNIFTL) { odsth = dst_host; if ((dst_host = gen_dynnode(dst_host, r->af)) == NULL) - err(1, "expand_rule: calloc"); + err(1, "%s: calloc", __func__); } error += check_netmask(src_host, r->af); @@ -6767,7 +6767,7 @@ lungetc(int c) if (file->ungetpos >= file->ungetsize) { void *p = reallocarray(file->ungetbuf, file->ungetsize, 2); if (p == NULL) - err(1, "lungetc"); + err(1, "%s", __func__); file->ungetbuf = p; file->ungetsize *= 2; } @@ -6877,7 +6877,7 @@ top: } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) - err(1, "yylex: strdup"); + err(1, "%s: strdup", __func__); return (STRING); case '!': next = lgetc(0); @@ -6965,7 +6965,7 @@ nodigits: *p = '\0'; if ((token = lookup(buf)) == STRING) if ((yylval.v.string = strdup(buf)) == NULL) - err(1, "yylex: strdup"); + err(1, "%s: strdup", __func__); return (token); } if (c == '\n') { @@ -7150,7 +7150,7 @@ pfctl_cmdline_symset(char *s) return (-1); if ((sym = malloc(strlen(s) - strlen(val) + 1)) == NULL) - err(1, "pfctl_cmdline_symset: malloc"); + err(1, "%s: malloc", __func__); strlcpy(sym, s, strlen(s) - strlen(val) + 1); @@ -7514,7 +7514,7 @@ node_mac_from_string(const char *str) m = calloc(1, sizeof(struct node_mac)); if (m == NULL) - err(1, "mac: calloc"); + err(1, "%s: calloc", __func__); if (sscanf(str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", &m->mac[0], &m->mac[1], &m->mac[2], &m->mac[3], &m->mac[4],