mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user