mkenvimage: fix usage message
authorWolfgang Denk <wd@denx.de>
Thu, 1 Mar 2012 21:19:40 +0000 (21:19 +0000)
committerAnatolij Gustschin <agust@denx.de>
Mon, 26 Mar 2012 09:45:15 +0000 (11:45 +0200)
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>
tools/mkenvimage.c

index f78173163f815d4ff5f7f34e708d254059293e77..64f5340b1b1e54a7d336c46edb13531f7ffbe936 100644 (file)
@@ -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);