1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

Silence warning

Cast the result of the operation to long, not the time(NULL) call.
On systems where sizeof(time_t) is other than long this will produce
a warning.
This commit is contained in:
Federico G. Schwindt 2013-08-25 00:07:06 +01:00
parent eb86d234f8
commit 8d01be7bbd

View File

@ -53,7 +53,7 @@ Log_Message(int Level, const char *msg)
if (!Is_Daemon) {
/* log to console */
fprintf(stdout, "[%ld:%d %4ld] %s\n", (long)getpid(), Level,
(long)time(NULL) - NGIRCd_Start, msg);
(long)(time(NULL) - NGIRCd_Start), msg);
fflush(stdout);
}
#ifdef SYSLOG