bootctl: fix an error check
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 23 May 2015 11:02:56 +0000 (13:02 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 23 May 2015 11:03:30 +0000 (13:03 +0200)
src/boot/bootctl.c

index ba534b1..1e65597 100644 (file)
@@ -805,7 +805,7 @@ static int remove_boot_efi(const char *esp_path) {
                         continue;
 
                 fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC);
-                if (r < 0)
+                if (fd < 0)
                         return log_error_errno(errno, "Failed to open \"%s/%s\" for reading: %m", p, de->d_name);
 
                 r = get_file_version(fd, &v);