diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-28 16:46:56 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-29 06:23:49 +0100 |
commit | c2f781bc15e98ac82fca16aa72cd332a24a6ce08 (patch) | |
tree | a304558a1c85aa6786c6d17461176e4fbb1c3285 /src/shared/conf-parser.c | |
parent | net-condition: move net_match_config() and related conf parsers (diff) | |
download | systemd-c2f781bc15e98ac82fca16aa72cd332a24a6ce08.tar.xz systemd-c2f781bc15e98ac82fca16aa72cd332a24a6ce08.zip |
conf-parser: fix indentation
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r-- | src/shared/conf-parser.c | 105 |
1 files changed, 56 insertions, 49 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 7798382cd8..a39a2cd3c7 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -253,15 +253,16 @@ static int parse_line( } /* Go through the file and parse each line */ -int config_parse(const char *unit, - const char *filename, - FILE *f, - const char *sections, - ConfigItemLookup lookup, - const void *table, - ConfigParseFlags flags, - void *userdata, - usec_t *ret_mtime) { +int config_parse( + const char *unit, + const char *filename, + FILE *f, + const char *sections, + ConfigItemLookup lookup, + const void *table, + ConfigParseFlags flags, + void *userdata, + usec_t *ret_mtime) { _cleanup_free_ char *section = NULL, *continuation = NULL; _cleanup_fclose_ FILE *ours = NULL; @@ -524,16 +525,17 @@ DEFINE_PARSER(sec, usec_t, parse_sec); DEFINE_PARSER(sec_def_infinity, usec_t, parse_sec_def_infinity); DEFINE_PARSER(mode, mode_t, parse_mode); -int config_parse_iec_size(const char* unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_iec_size( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { size_t *sz = data; uint64_t v; @@ -610,16 +612,17 @@ int config_parse_iec_uint64( return 0; } -int config_parse_bool(const char* unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_bool( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { int k; bool *b = data; @@ -1183,16 +1186,17 @@ int config_parse_rlimit( return 0; } -int config_parse_permille(const char* unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_permille( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { unsigned *permille = data; int r; @@ -1214,17 +1218,20 @@ int config_parse_permille(const char* unit, return 0; } -int config_parse_vlanprotocol(const char* unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_vlanprotocol( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + int *vlan_protocol = data; + assert(filename); assert(lvalue); |