On Wed, Apr 05, 2023 at 10:09:46AM +0200, Claudio Jeker wrote:
> Allow to use service names like 'bgp' for port definitions.
> Adapted from pfctl/parse.y.

[...]

> +static int
> +getservice(char *n)
> +{
> +     struct servent  *s;
> +
> +     s = getservbyname(n, "tcp");
> +     if (s == NULL)
> +             s = getservbyname(n, "udp");
> +     if (s == NULL)
> +             return (-1);

I'd omit the parentheses here to keep the style in this file consistent
on a per-function level.

ok

> +     return s->s_port;
>  }

Reply via email to