From: Adhemerval Zanella Date: Thu, 28 May 2026 20:30:08 +0000 (-0300) Subject: hesiod: use booleans in parser macro calls X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7052455f0e85673abebad5d5814e73e22287c081;p=thirdparty%2Fglibc.git hesiod: use booleans in parser macro calls The swallow argument in the INT_FIELD and STRING_FIELD macros is used as a boolean, change all callers to use false and true instead of 0 and 1. Reviewed-by: H.J. Lu --- diff --git a/hesiod/nss_hesiod/hesiod-proto.c b/hesiod/nss_hesiod/hesiod-proto.c index d47abca1fd..a85769a74f 100644 --- a/hesiod/nss_hesiod/hesiod-proto.c +++ b/hesiod/nss_hesiod/hesiod-proto.c @@ -39,8 +39,8 @@ struct protoent_data {}; #include LINE_PARSER ("#", - STRING_FIELD (result->p_name, isspace, 1); - INT_FIELD (result->p_proto, isspace, 1, 10,); + STRING_FIELD (result->p_name, isspace, true); + INT_FIELD (result->p_proto, isspace, true, 10,); ) enum nss_status diff --git a/hesiod/nss_hesiod/hesiod-service.c b/hesiod/nss_hesiod/hesiod-service.c index 11ee302853..205ba69f4b 100644 --- a/hesiod/nss_hesiod/hesiod-service.c +++ b/hesiod/nss_hesiod/hesiod-service.c @@ -39,9 +39,9 @@ struct servent_data {}; #define ISSC_OR_SPACE(c) ((c) == ';' || isspace (c)) 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, 0, 10, htons); + STRING_FIELD (result->s_name, ISSC_OR_SPACE, true); + STRING_FIELD (result->s_proto, ISSC_OR_SPACE, true); + INT_FIELD (result->s_port, ISSC_OR_SPACE, false, 10, htons); ) enum nss_status