[PATCH] nss_files: fix swapped arguments in service parser
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue May 19 13:15:37 GMT 2026
On 19/05/26 08:23, Andreas Schwab wrote:
> The port number in the service file is a decimal number followed by a
> single slash.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> nss/nss_files/files-service.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
> index 1bff1a2ab6..2ba48b798d 100644
> --- a/nss/nss_files/files-service.c
> +++ b/nss/nss_files/files-service.c
> @@ -32,7 +32,7 @@ struct servent_data {};
> LINE_PARSER
> ("#",
> STRING_FIELD (result->s_name, isspace, 1);
> - INT_FIELD (result->s_port, ISSLASH, 10, 0, htons);
> + INT_FIELD (result->s_port, ISSLASH, 0, 10, htons);
> STRING_FIELD (result->s_proto, isspace, 1);
> )
>
More information about the Libc-alpha
mailing list