From: Lennart Poettering Date: Tue, 18 Jun 2024 15:09:34 +0000 (+0200) Subject: install: shorten code a bit X-Git-Tag: v257-rc1~1078^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F33408%2Fhead;p=thirdparty%2Fsystemd.git install: shorten code a bit This changes behaviour a bit, since we now keep track of OOM errors in install_changes_add(). Which I'd argue is a good thing. --- diff --git a/src/shared/install.c b/src/shared/install.c index 70ba230ac16..08c2915fb53 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -2454,10 +2454,8 @@ int unit_file_unmask( return -ENOMEM; if (!dry_run && unlink(path) < 0) { - if (errno != ENOENT) { - RET_GATHER(r, -errno); - install_changes_add(changes, n_changes, -errno, path, NULL); - } + if (errno != ENOENT) + RET_GATHER(r, install_changes_add(changes, n_changes, -errno, path, NULL)); continue; }