[glibc] hesiod: use booleans in parser macro calls

Adhemerval Zanella via Glibc-cvs <[email protected]> Fri, 29 May 2026 17:01:00 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7052455f0e85673abebad5d5814e73e22287c081

commit 7052455f0e85673abebad5d5814e73e22287c081
Author: Adhemerval Zanella <[email protected]>
Date:   Thu May 28 17:30:08 2026 -0300

    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 <[email protected]>

Diff:
---
 hesiod/nss_hesiod/hesiod-proto.c   | 4 ++--
 hesiod/nss_hesiod/hesiod-service.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

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 <nss/nss_files/files-parse.c>
 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