]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: Fix use of uninitialized variable
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Apr 2024 12:59:37 +0000 (12:59 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 19 Apr 2024 06:04:36 +0000 (06:04 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/installer/hw.c

index 039f8ac26181ceef1daae2492929fe7e1986978b..77c2d546ec136ba18cf1779a1a7a29fd375cea22 100644 (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;