1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00

network: can: shorten code a bit

This commit is contained in:
Yu Watanabe 2021-04-30 07:06:28 +09:00
parent ed52cce33f
commit e361398e48

View File

@ -252,21 +252,13 @@ int link_configure_can(Link *link) {
if (streq_ptr(link->kind, "can")) {
/* The CAN interface must be down to configure bitrate, etc... */
if ((link->flags & IFF_UP)) {
if ((link->flags & IFF_UP))
r = link_down(link, link_down_handler);
if (r < 0) {
link_enter_failed(link);
return r;
}
} else {
else
r = link_set_can(link);
if (r < 0) {
link_enter_failed(link);
return r;
}
}
return 0;
if (r < 0)
link_enter_failed(link);
return r;
}
if (!(link->flags & IFF_UP)) {