summaryrefslogtreecommitdiff
path: root/src/stdbuf.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-30 22:29:19 +0200
committerJim Meyering <meyering@redhat.com>2009-08-30 22:34:06 +0200
commitc1e158489d88bad418d52ceadf37af0b6f5b2112 (patch)
tree16b3e3d749bf2e4238fcb6573adffb4648142915 /src/stdbuf.c
parent12a104b45e6bd90c81836977beb7457e7bb1cf28 (diff)
downloadcoreutils-c1e158489d88bad418d52ceadf37af0b6f5b2112.tar.xz
maint: stdbuf: move a declaration; no-semantic-change
* src/stdbuf.c (set_program_path): Move a declaration down into the scope where it's used.
Diffstat (limited to 'src/stdbuf.c')
-rw-r--r--src/stdbuf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/stdbuf.c b/src/stdbuf.c
index 007cc2194..38a531375 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -145,7 +145,6 @@ 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)
@@ -156,7 +155,7 @@ set_program_path (const char *arg)
else if ((path = getenv ("PATH")))
{
char *dir;
- path = xstrdup (path);
+ char *path = xstrdup (path);
for (dir = strtok (path, ":"); dir != NULL; dir = strtok (NULL, ":"))
{
int req = snprintf (tmppath, sizeof (tmppath), "%s/%s", dir, arg);