From: Jim Meyering Date: Sun, 30 Aug 2009 20:29:19 +0000 (+0200) Subject: maint: stdbuf: move a declaration; no-semantic-change X-Git-Tag: v7.6~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1e158489d88bad418d52ceadf37af0b6f5b2112;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/stdbuf.c b/src/stdbuf.c index 007cc21946..38a531375f 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);