X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/27e9e8ad199ef568950a4a74fd896c98f8b76b33..23971dd8b6775706a0462efe817e02ab9a876078:/pw/pw_log.c diff --git a/pw/pw_log.c b/pw/pw_log.c index f16274f..29038d9 100644 --- a/pw/pw_log.c +++ b/pw/pw_log.c @@ -30,6 +30,8 @@ static const char rcsid[] = #endif /* not lint */ #include +#include +#include #include "pw.h" @@ -47,7 +49,6 @@ pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) } if (logfile != NULL) { va_list argp; - int l; time_t now = time(NULL); struct tm *t = localtime(&now); char nfmt[256]; @@ -57,7 +58,6 @@ pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) name = "unknown"; /* ISO 8601 International Standard Date format */ strftime(nfmt, sizeof nfmt, "%Y-%m-%d %T ", t); - l = strlen(nfmt); sprintf(nfmt + strlen(nfmt), "[%s:%s%s] %s\n", name, Which[which], Modes[mode], fmt); va_start(argp, fmt); vfprintf(logfile, nfmt, argp);