From: Lennart Poettering Date: Wed, 10 Feb 2021 17:12:58 +0000 (+0100) Subject: sd-netlink: reduce indentation levels a bit X-Git-Tag: v248-rc1~156^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=baf78f1a51793c3dbbeb2b420783573d627f85a8;p=thirdparty%2Fsystemd.git sd-netlink: reduce indentation levels a bit --- diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index b0a1eb77ec7..aa9442c418b 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -419,20 +419,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;