On Sun, 19 Feb 2023 19:04:28 +0100
Daniel Gröber <d...@darkboxed.org> wrote:

> +static inline bool parse_address_family(int *family, const char *value)
> +{
> +     if (strcmp(value, "inet") == 0)
> +             *family = AF_INET;
> +     else if (strcmp(value, "inet6") == 0)
> +             *family = AF_INET6;

Wouldn't the first condition match "inet6" as well, not ever checking the
second condition?

> +     else if (strcmp(value, "unspec") == 0)
> +             *family = AF_UNSPEC;
> +     else
> +             return false;
> +
> +     return true;
> +}


-- 
With respect,
Roman

Reply via email to