X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/fb89f7ffb1d51a743bc2820dde96e0a798dc40c9..a4f046e1dc5c6d28ee9bf9fa5a4d1764e361a72a:/logging.c diff --git a/logging.c b/logging.c index b311784b..c843118d 100644 --- a/logging.c +++ b/logging.c @@ -1,5 +1,3 @@ -#include - #include #include #include @@ -11,7 +9,6 @@ /* log session to file stuff ... */ static FILE *lgfp = NULL; -static char timdatbuf[20]; static char currlogfilename[FILENAME_MAX]; static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm); @@ -150,7 +147,6 @@ void logfclose(void) static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm) { char buf[10], *bufp; int size; - char *ds = d; /* save start pos. */ int len = FILENAME_MAX-1; while (*s) { @@ -159,6 +155,7 @@ static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm) { if (*s == '&') { char c; s++; + size = 0; if (*s) switch (c = *s++, tolower(c)) { case 'y': size = strftime(buf, sizeof(buf), "%Y", tm);