diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index b54090046e..b48e423422 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -126,12 +126,8 @@ static int load_link(link_config_ctx *ctx, const char *filename) { assert(filename); file = fopen(filename, "re"); - if (!file) { - if (errno == ENOENT) - return 0; - else - return -errno; - } + if (!file) + return errno == ENOENT ? 0 : -errno; if (null_or_empty_fd(fileno(file))) { log_debug("Skipping empty file: %s", filename);