Commit d80d526f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(log): A pid is sometimes larger than an int, so use %ld

	and proper casts when printing the pid.
parent 6ca0b2a7
/*
* $Id: log.c,v 0.13 1994/08/19 22:04:55 ceder Exp $
* $Id: log.c,v 0.14 1995/11/02 20:32:12 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* File created by ceder 1990-05-25.
*/
static char *rcsid = "$Id: log.c,v 0.13 1994/08/19 22:04:55 ceder Exp $";
static char *rcsid = "$Id: log.c,v 0.14 1995/11/02 20:32:12 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -67,9 +67,9 @@ logv (const char *format, va_list AP)
time(&clock);
t = localtime(&clock);
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %ld ",
t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec, getpid());
t->tm_hour, t->tm_min, t->tm_sec, (long)getpid());
vfprintf(stderr, format, AP);
fflush(stderr);
......@@ -85,9 +85,9 @@ log (const char * format,
time(&clock);
t = localtime(&clock);
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %ld ",
t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec, getpid());
t->tm_hour, t->tm_min, t->tm_sec, (long)getpid());
fprintf(stderr, format, a, b, c, d, e, f, g);
fflush(stderr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment