Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- src/installer/hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/installer/hw.c b/src/installer/hw.c index 039f8ac26..77c2d546e 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -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;