From c1e158489d88bad418d52ceadf37af0b6f5b2112 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Aug 2009 22:29:19 +0200 Subject: 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. --- src/stdbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/stdbuf.c') 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); -- cgit v1.2.3-70-g09d2