]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hesiod: use booleans in parser macro calls
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 28 May 2026 20:30:08 +0000 (17:30 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 29 May 2026 16:58:58 +0000 (13:58 -0300)
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 <hjl.tools@gmail.com>
hesiod/nss_hesiod/hesiod-proto.c
hesiod/nss_hesiod/hesiod-service.c

index d47abca1fd9f313ef0bcddac597cb3d7ef1cce87..a85769a74f86b28ab8d89e26efd67bb71e01da9e 100644 (file)
@@ -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
index 11ee302853ee69962553cdba208facc1407d4154..205ba69f4b0a1a21c8c7f2ada6cd72dcb4cf1a02 100644 (file)
@@ -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