diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-02-10 18:12:58 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-03-12 16:24:29 +0100 |
commit | 2acc4633ede7c31c204e1c1753d58d3d62f80a0d (patch) | |
tree | 11483b9bacb85ea203bbdcdfe396691626c852bc | |
parent | 4d93ff59eaa451d03bed02622477fd26eea9c14d (diff) | |
download | systemd-2acc4633ede7c31c204e1c1753d58d3d62f80a0d.tar.gz |
sd-netlink: reduce indentation levels a bit
(cherry picked from commit baf78f1a51793c3dbbeb2b420783573d627f85a8)
-rw-r--r-- | src/libsystemd/sd-netlink/sd-netlink.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index 88156d1f06..35d951945f 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -384,20 +384,19 @@ static int process_match(sd_netlink *rtnl, sd_netlink_message *m) { return r; LIST_FOREACH(match_callbacks, c, rtnl->match_callbacks) { - if (type == c->type) { - slot = container_of(c, sd_netlink_slot, match_callback); + if (type != c->type) + continue; - r = c->callback(rtnl, m, slot->userdata); - if (r != 0) { - if (r < 0) - log_debug_errno(r, "sd-netlink: match callback %s%s%sfailed: %m", - slot->description ? "'" : "", - strempty(slot->description), - slot->description ? "' " : ""); + slot = container_of(c, sd_netlink_slot, match_callback); - break; - } - } + r = c->callback(rtnl, m, slot->userdata); + if (r < 0) + log_debug_errno(r, "sd-netlink: match callback %s%s%sfailed: %m", + slot->description ? "'" : "", + strempty(slot->description), + slot->description ? "' " : ""); + if (r != 0) + break; } return 1; |