Browse Source

mkenvimage: fix usage message

Don't use argv[0] for usage() because it may or may not be clobbered
by the previous call to basename().  Use "prg" instead as it is done
in the rest of the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Wolfgang Denk 12 years ago
parent
commit
e758a5c4a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/mkenvimage.c

+ 1 - 1
tools/mkenvimage.c

@@ -123,7 +123,7 @@ int main(int argc, char **argv)
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
 				optopt);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		default:
 			fprintf(stderr, "Wrong option -%c\n", optopt);