nice.c: avoid a cast
authorJim Meyering <meyering@redhat.com>
Tue, 3 Jun 2008 11:58:07 +0000 (13:58 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 3 Jun 2008 11:58:07 +0000 (13:58 +0200)
* src/nice.c (main): Use argv[0], rather than
"program_name with a cast".  Suggestion from Eric Blake.

src/nice.c

index 1dcb3a3..13033ec 100644 (file)
@@ -123,7 +123,7 @@ main (int argc, char **argv)
          char **fake_argv = argv + (i - 1);
 
          /* Ensure that any getopt diagnostics use the right name.  */
-         fake_argv[0] = (char *) program_name;
+         fake_argv[0] = argv[0];
 
          /* Initialize getopt_long's internal state.  */
          optind = 0;