]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bless-boot: remove a bunch of 'else'
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2022 11:37:15 +0000 (13:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Aug 2022 13:10:15 +0000 (15:10 +0200)
src/boot/bless-boot.c

index a0f347bddf57f345dd7dbc83f2b9e18b8c19474b..554a716d8a8ccbdfe1edb353f94696391547b4f1 100644 (file)
@@ -448,12 +448,12 @@ static int verb_set(int argc, char *argv[], void *userdata) {
                 r = rename_noreplace(fd, skip_slash(source1), fd, skip_slash(target));
                 if (r == -EEXIST)
                         goto exists;
-                else if (r == -ENOENT) {
+                if (r == -ENOENT) {
 
                         r = rename_noreplace(fd, skip_slash(source2), fd, skip_slash(target));
                         if (r == -EEXIST)
                                 goto exists;
-                        else if (r == -ENOENT) {
+                        if (r == -ENOENT) {
 
                                 if (faccessat(fd, skip_slash(target), F_OK, 0) >= 0) /* Hmm, if we can't find either source file, maybe the destination already exists? */
                                         goto exists;