]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Move the declaration of `e' into the scope
authorJim Meyering <jim@meyering.net>
Thu, 1 Apr 1999 04:56:28 +0000 (04:56 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 1 Apr 1999 04:56:28 +0000 (04:56 +0000)
where it's used and make it `const'.

src/chown.c

index 9ca3c7680cb0d172246f721dba2d13b618571443..a91e886c8d0ac80204352a2d4851d288454f8cea 100644 (file)
@@ -324,7 +324,6 @@ main (int argc, char **argv)
   gid_t group = (uid_t) -1;    /* New gid; -1 if not to be changed. */
   int errors = 0;
   int optc;
-  char *e;
 
   program_name = argv[0];
   setlocale (LC_ALL, "");
@@ -385,7 +384,8 @@ main (int argc, char **argv)
     }
   else
     {
-      e = parse_user_spec (argv[optind], &user, &group, &username, &groupname);
+      const char *e = parse_user_spec (argv[optind], &user, &group,
+                                      &username, &groupname);
       if (e)
         error (1, 0, "%s: %s", argv[optind], e);
       if (username == NULL)