firmware-utils: fix use of NULL string progname
authorStefan Weil <sw@weilnetz.de>
Sun, 19 Mar 2023 10:19:48 +0000 (11:19 +0100)
committerAlexander Couzens <lynxis@fe80.eu>
Wed, 30 Aug 2023 14:48:29 +0000 (16:48 +0200)
The compiler complains about several lines which use `progname`,
but that char pointer was NULL.

Fixes: 16cff6c7ca36 ("firmware-utils: fix unused variable warnings")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/mkzcfw.c

index 1d6fbc4f18522c886545a4023194b0a08f322b18..b36967d7bf2925f2bc001a6696f221cf5e409ccc 100644 (file)
@@ -356,6 +356,8 @@ int main(int argc, char *argv[])
 {
        int ret = EXIT_FAILURE;
 
+       progname = basename(argv[0]);
+
        while ( 1 ) {
                int c;