From: Michael Tremer Date: Fri, 5 Apr 2024 12:59:37 +0000 (+0000) Subject: installer: Fix use of uninitialized variable X-Git-Tag: v2.29-core186~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb64913be183be3ce4fecf6c0b5270a2d1cd98d0;p=ipfire-2.x.git installer: Fix use of uninitialized variable Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter --- diff --git a/src/installer/hw.c b/src/installer/hw.c index 039f8ac261..77c2d546ec 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;