]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/installer/hw.c
installer: Fix use of uninitialized variable
[ipfire-2.x.git] / 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;