]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: reduce indentation levels a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Feb 2021 17:12:58 +0000 (18:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 10 Feb 2021 21:01:24 +0000 (22:01 +0100)
src/libsystemd/sd-netlink/sd-netlink.c

index b0a1eb77ec7a78a6dbfc161b0cd8f1c42b90f2bf..aa9442c418bd2ca7eb04e5c58f86c1e348647e27 100644 (file)
@@ -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;