summaryrefslogtreecommitdiff
path: root/src/machine/machine.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2015-11-02 16:55:59 +0530
committerSusant Sahani <ssahani@gmail.com>2015-11-02 16:55:59 +0530
commit52278ad31d92dffa9029c8a171b9e9348f5dcc8f (patch)
tree4223739e9a74c528d444cc70e1bd3de1a24c7dcf /src/machine/machine.c
parent117b94060da6ec4bacbc2319264bb0f921ce7bf1 (diff)
machine: fix extract_first_word
Diffstat (limited to 'src/machine/machine.c')
-rw-r--r--src/machine/machine.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c
index df8391c996..ef5c8551b5 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -323,11 +323,14 @@ int machine_load(Machine *m) {
int ifi;
r = extract_first_word(&p, &word, NULL, 0);
- if (r < 0)
- return log_error_errno(r, "Failed to parse NETIF: %s", netif);
-
if (r == 0)
break;
+ else if (r == -ENOMEM)
+ return log_oom();
+ else if (r < 0) {
+ log_warning_errno(r, "Failed to parse NETIF: %s", netif);
+ continue;
+ }
if (safe_atoi(word, &ifi) < 0)
continue;