]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: revert my stdbuf change: the result didn't even compile
authorJim Meyering <meyering@redhat.com>
Mon, 31 Aug 2009 07:44:30 +0000 (09:44 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 31 Aug 2009 07:44:30 +0000 (09:44 +0200)
This reverts commit c1e158489d88bad418d52ceadf37af0b6f5b2112.

src/stdbuf.c

index 38a531375f00f361ceff66051dfdb8bd83fea849..007cc21946ff11a95e79e4c7075d663999ed94e2 100644 (file)
@@ -145,6 +145,7 @@ set_program_path (const char *arg)
     }
   else
     {
+      char *path;
       char tmppath[PATH_MAX + 1];
       ssize_t len = readlink ("/proc/self/exe", tmppath, sizeof (tmppath) - 1);
       if (len > 0)
@@ -155,7 +156,7 @@ set_program_path (const char *arg)
       else if ((path = getenv ("PATH")))
         {
           char *dir;
-          char *path = xstrdup (path);
+          path = xstrdup (path);
           for (dir = strtok (path, ":"); dir != NULL; dir = strtok (NULL, ":"))
             {
               int req = snprintf (tmppath, sizeof (tmppath), "%s/%s", dir, arg);