Get rid of a __DECONST by strdup'ing the string in question. When

called this way the program just prints its help intro, so the
memory leak is not a problem.

Pointed out by: bde
This commit is contained in:
Hartmut Brandt 2003-08-20 08:25:36 +00:00
parent 36ffc09c55
commit 70b6366edd

View File

@ -105,7 +105,8 @@ help_func(int argc, char *argv[])
errx(1, "help file not found");
if (argc == 0) {
argv[0] = __DECONST(char *, "intro");
if ((argv[0] = strdup("intro")) == NULL)
err(1, NULL);
argc = 1;
}