From fbe186e79d2083a7bbd1588b317cd5782bc5ae73 Mon Sep 17 00:00:00 2001 From: NRK Date: Thu, 16 Jun 2022 19:33:32 +0600 Subject: don't assume positive argc handle a rare, but possible case of argc being 0, in which case argv[0] would be null. note that both POSIX and ISO C standard allow argc to be 0 and in practice this can be triggered via calling `exec(3)` family of functions with NULL as the first `argv`. --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util.c') diff --git a/util.c b/util.c index f03fe23..8b164ed 100644 --- a/util.c +++ b/util.c @@ -28,7 +28,7 @@ #include #include -const char *progname; +const char *progname = "nsxiv"; void* emalloc(size_t size) { -- cgit v1.2.3-54-g00ecf