X Tutup
Skip to content

Commit 3e8afae

Browse files
committed
network: re-indent conf parser and wrap long lines in bond.c
1 parent 674c96f commit 3e8afae

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

src/network/netdev/bond.c

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -358,16 +358,17 @@ int config_parse_arp_ip_target_address(
358358
}
359359
}
360360

361-
int config_parse_ad_actor_sys_prio(const char *unit,
362-
const char *filename,
363-
unsigned line,
364-
const char *section,
365-
unsigned section_line,
366-
const char *lvalue,
367-
int ltype,
368-
const char *rvalue,
369-
void *data,
370-
void *userdata) {
361+
int config_parse_ad_actor_sys_prio(
362+
const char *unit,
363+
const char *filename,
364+
unsigned line,
365+
const char *section,
366+
unsigned section_line,
367+
const char *lvalue,
368+
int ltype,
369+
const char *rvalue,
370+
void *data,
371+
void *userdata) {
371372
Bond *b = userdata;
372373
uint16_t v;
373374
int r;
@@ -379,12 +380,15 @@ int config_parse_ad_actor_sys_prio(const char *unit,
379380

380381
r = safe_atou16(rvalue, &v);
381382
if (r < 0) {
382-
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse actor system priority '%s', ignoring: %m", rvalue);
383+
log_syntax(unit, LOG_ERR, filename, line, r,
384+
"Failed to parse actor system priority '%s', ignoring: %m", rvalue);
383385
return 0;
384386
}
385387

386388
if (v == 0) {
387-
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse actor system priority '%s'. Range is [1,65535], ignoring.", rvalue);
389+
log_syntax(unit, LOG_ERR, filename, line, 0,
390+
"Failed to parse actor system priority '%s'. Range is [1,65535], ignoring.",
391+
rvalue);
388392
return 0;
389393
}
390394

@@ -393,16 +397,17 @@ int config_parse_ad_actor_sys_prio(const char *unit,
393397
return 0;
394398
}
395399

396-
int config_parse_ad_user_port_key(const char *unit,
397-
const char *filename,
398-
unsigned line,
399-
const char *section,
400-
unsigned section_line,
401-
const char *lvalue,
402-
int ltype,
403-
const char *rvalue,
404-
void *data,
405-
void *userdata) {
400+
int config_parse_ad_user_port_key(
401+
const char *unit,
402+
const char *filename,
403+
unsigned line,
404+
const char *section,
405+
unsigned section_line,
406+
const char *lvalue,
407+
int ltype,
408+
const char *rvalue,
409+
void *data,
410+
void *userdata) {
406411
Bond *b = userdata;
407412
uint16_t v;
408413
int r;
@@ -414,12 +419,14 @@ int config_parse_ad_user_port_key(const char *unit,
414419

415420
r = safe_atou16(rvalue, &v);
416421
if (r < 0) {
417-
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse user port key '%s', ignoring: %m", rvalue);
422+
log_syntax(unit, LOG_ERR, filename, line, r,
423+
"Failed to parse user port key '%s', ignoring: %m", rvalue);
418424
return 0;
419425
}
420426

421427
if (v > 1023) {
422-
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse user port key '%s'. Range is [0,1023], ignoring.", rvalue);
428+
log_syntax(unit, LOG_ERR, filename, line, 0,
429+
"Failed to parse user port key '%s'. Range is [0…1023], ignoring.", rvalue);
423430
return 0;
424431
}
425432

0 commit comments

Comments
 (0)
X Tutup