summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-31 09:44:30 +0200
committerJim Meyering <meyering@redhat.com>2009-08-31 09:44:30 +0200
commita4e123abd3dab42f48cc79d9e2c1cbc72e77d18b (patch)
tree6d95fdea7808d06a8f23a00474eb6afd868422cb
parentc1e158489d88bad418d52ceadf37af0b6f5b2112 (diff)
downloadcoreutils-a4e123abd3dab42f48cc79d9e2c1cbc72e77d18b.tar.xz
maint: revert my stdbuf change: the result didn't even compile
This reverts commit c1e158489d88bad418d52ceadf37af0b6f5b2112.
-rw-r--r--src/stdbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdbuf.c b/src/stdbuf.c
index 38a531375..007cc2194 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -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);