[PATCH 1/2] hesiod: fix swapped arguments in service parser
H.J. Lu
hjl.tools@gmail.com
Fri May 29 12:36:40 GMT 2026
On Fri, May 29, 2026 at 4:31 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> The port number in the service file is a decimal number followed by a
> single slash.
> ---
> hesiod/nss_hesiod/hesiod-service.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hesiod/nss_hesiod/hesiod-service.c b/hesiod/nss_hesiod/hesiod-service.c
> index 3b5c704660a..11ee302853e 100644
> --- a/hesiod/nss_hesiod/hesiod-service.c
> +++ b/hesiod/nss_hesiod/hesiod-service.c
> @@ -41,7 +41,7 @@ LINE_PARSER
> ("#",
> STRING_FIELD (result->s_name, ISSC_OR_SPACE, 1);
> STRING_FIELD (result->s_proto, ISSC_OR_SPACE, 1);
> - INT_FIELD (result->s_port, ISSC_OR_SPACE, 10, 0, htons);
> + INT_FIELD (result->s_port, ISSC_OR_SPACE, 0, 10, htons);
> )
>
> enum nss_status
> --
> 2.43.0
>
LGTM.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list