From: Jim Meyering Date: Thu, 5 Dec 1996 04:55:51 +0000 (+0000) Subject: (init_header): Move dcl of FMT into block where it's used. X-Git-Tag: TEXTUTILS-1_19q~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2882d4477ddad61a4ee298a06c08b33d6f6bb46f;p=thirdparty%2Fcoreutils.git (init_header): Move dcl of FMT into block where it's used. --- diff --git a/src/pr.c b/src/pr.c index 15f15a0ece..e15beadb78 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1360,13 +1360,11 @@ init_header (char *filename, int desc) int chars_per_middle, chars_free, lhs_blanks, rhs_blanks; char *f = filename; char *no_middle = ""; - char *header_text, *fmt, *t_buf; + char *header_text, *t_buf; struct tm *tmptr; struct stat st; char *datim = "- Date/Time --"; - fmt = "%y-%m-%d %H:%M"; /* date/time short format */ - if (filename == 0) f = ""; @@ -1384,6 +1382,8 @@ init_header (char *filename, int desc) { size_t t_buf_size = 15; + cons tchar *fmt = "%y-%m-%d %H:%M"; /* date/time short format */ + t_buf = (char *) xmalloc (t_buf_size); tmptr = localtime (&st.st_mtime); strftime (t_buf, t_buf_size, fmt, tmptr);