]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Silence warning
authorFederico G. Schwindt <fgsch@lodoss.net>
Sat, 24 Aug 2013 23:07:06 +0000 (00:07 +0100)
committerFederico G. Schwindt <fgsch@lodoss.net>
Sun, 25 Aug 2013 04:24:11 +0000 (05:24 +0100)
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.

src/ngircd/log.c

index 028f43532c7cb8778ad80ca3c3a58d795d533452..18fb6fa3288e9704589237ae49f526ec1916a6e7 100644 (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