installer: Fix use of uninitialized variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Michael Tremer
2024-04-05 12:59:37 +00:00
committed by Arne Fitzenreiter
parent cebe531b70
commit eb64913be1

View File

@@ -132,11 +132,12 @@ static int strstartswith(const char* a, const char* b) {
}
static int setup_loop_device(const char* source, const char* device) {
int device_fd = -1;
int file_fd = open(source, O_RDWR);
if (file_fd < 0)
goto ERROR;
int device_fd = -1;
if ((device_fd = open(device, O_RDWR)) < 0)
goto ERROR;