libpfctl: fix error handling
In two cases we returned E2BIG where it should have been a boolean ('false').
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
@@ -1491,7 +1491,7 @@ snl_attr_get_pf_rule_labels(struct snl_state *ss, struct nlattr *nla,
|
||||
bool ret;
|
||||
|
||||
if (l->i >= PF_RULE_MAX_LABEL_COUNT)
|
||||
return (E2BIG);
|
||||
return (false);
|
||||
|
||||
ret = snl_attr_copy_string(ss, nla, (void *)PF_RULE_LABEL_SIZE,
|
||||
l->labels[l->i]);
|
||||
@@ -1561,7 +1561,7 @@ snl_attr_get_pf_timeout(struct snl_state *ss, struct nlattr *nla,
|
||||
bool ret;
|
||||
|
||||
if (t->i >= PFTM_MAX)
|
||||
return (E2BIG);
|
||||
return (false);
|
||||
|
||||
ret = snl_attr_get_uint32(ss, nla, NULL, &t->timeouts[t->i]);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user