summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/link-config.c7
-rw-r--r--src/udev/udevd.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 428a71dce3..5aefb7d415 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -174,11 +174,10 @@ static bool enable_name_policy(void) {
size_t l;
r = proc_cmdline(&line);
- if (r < 0)
- log_warning("Failed to read /proc/cmdline, ignoring: %s",
- strerror(-r));
- if (r <= 0)
+ if (r < 0) {
+ log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return true;
+ }
FOREACH_WORD_QUOTED(word, l, line, state)
if (strneq(word, "net.ifnames=0", l))
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 305ce86cdf..a040529e6f 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -961,10 +961,10 @@ static void kernel_cmdline_options(struct udev *udev) {
int r;
r = proc_cmdline(&line);
- if (r < 0)
+ if (r < 0) {
log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
- if (r <= 0)
return;
+ }
FOREACH_WORD_QUOTED(word, l, line, state) {
char *s, *opt, *value;