projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New function ltime() returns a struct tm of the current local time.
[u/mdw/putty]
/
logging.c
diff --git
a/logging.c
b/logging.c
index
808e429
..
f1c42cd
100644
(file)
--- a/
logging.c
+++ b/
logging.c
@@
-169,7
+169,6
@@
void logfopen(void *handle)
{
struct LogContext *ctx = (struct LogContext *)handle;
char buf[256];
{
struct LogContext *ctx = (struct LogContext *)handle;
char buf[256];
- time_t t;
struct tm tm;
char writemod[4];
struct tm tm;
char writemod[4];
@@
-181,8
+180,7
@@
void logfopen(void *handle)
return;
sprintf(writemod, "wb"); /* default to rewrite */
return;
sprintf(writemod, "wb"); /* default to rewrite */
- time(&t);
- tm = *localtime(&t);
+ tm = ltime();
/* substitute special codes in file name */
xlatlognam(&ctx->currlogfilename, ctx->cfg.logfilename,ctx->cfg.host, &tm);
/* substitute special codes in file name */
xlatlognam(&ctx->currlogfilename, ctx->cfg.logfilename,ctx->cfg.host, &tm);