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 <hjl.tools@gmail.com>
This commit is contained in:
Adhemerval Zanella
2026-05-29 13:58:58 -03:00
parent 41e9457c53
commit 7052455f0e
2 changed files with 5 additions and 5 deletions
+2 -2
View 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
+3 -3
View 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