OK either way, but see below.
On Mon, Apr 08, 2019 at 09:56:46AM +0200, Alexandr Nedvedicky wrote:
> + pf.ifname = strdup("none");
> + if (pf.ifname == NULL)
> + err(1, "%s: strdup", __func__);
> + else
> + pf.ifname_set = 1;
This branch is redundant and confusing, that pattern is also rarely
seen in the tree. The following is more obvious to the reader and
resembles the code flow more clearly, I'd say:
pf.ifname = strdup("none");
if (pf.ifname == NULL)
err(1, "%s: strdup", __func__);
pf.ifname_set = 1;