]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine: when we fail to extract a network interface from the machine state, don...
authorLennart Poettering <lennart@poettering.net>
Mon, 2 Nov 2015 22:47:38 +0000 (23:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Nov 2015 23:02:00 +0000 (00:02 +0100)
If we failed to extract a word, then that's how it is, we shouldn't try
to extract it again and again, it's unlikely to work, and we just
deadlock.

This is a fix-up for 52278ad31d92dffa9029c8a171b9e9348f5dcc8f.

src/machine/machine.c

index ef5c8551b542532749644dbafc35c7c19943a0d6..d88b7c90df2e38f2d0854df7d147b95f33949d6b 100644 (file)
@@ -325,11 +325,11 @@ int machine_load(Machine *m) {
                         r = extract_first_word(&p, &word, NULL, 0);
                         if (r == 0)
                                 break;
-                        else if (r == -ENOMEM)
+                        if (r == -ENOMEM)
                                 return log_oom();
-                        else if (r < 0) {
+                        if (r < 0) {
                                 log_warning_errno(r, "Failed to parse NETIF: %s", netif);
-                                continue;
+                                break;
                         }
 
                         if (safe_atoi(word, &ifi) < 0)