From: Yu Watanabe Date: Mon, 25 Feb 2019 02:48:39 +0000 (+0900) Subject: udev/net: shorten load_link() a little bit X-Git-Tag: v242-rc1~252^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2d251cdb8f8318666599fc47ee506c59b274ce0;p=thirdparty%2Fsystemd.git udev/net: shorten load_link() a little bit --- diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index b54090046e7..b48e423422d 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);