summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-10-29 00:46:56 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-10-29 14:23:49 +0900
commitc2f781bc15e98ac82fca16aa72cd332a24a6ce08 (patch)
treea304558a1c85aa6786c6d17461176e4fbb1c3285 /src/shared
parent7e19cc54628bb320209ebab15b3b5d119fbccd00 (diff)
downloadsystemd-c2f781bc15e98ac82fca16aa72cd332a24a6ce08.tar.gz
conf-parser: fix indentation
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/conf-parser.c105
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);