Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pim6dd Correct prototyping- gettimeofday takes an a...



details:   https://anonhg.NetBSD.org/src/rev/8ee819e9932e
branches:  trunk
changeset: 474793:8ee819e9932e
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Wed Jul 21 02:02:27 1999 +0000

description:
Correct prototyping- gettimeofday takes an address of a struct timeval.
localtime needs an address of a time_t. A time_t is not the same as
{struct timeval}.tv_sec.

diffstat:

 usr.sbin/pim6dd/debug.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r b557d2ac4702 -r 8ee819e9932e usr.sbin/pim6dd/debug.c
--- a/usr.sbin/pim6dd/debug.c   Wed Jul 21 01:14:49 1999 +0000
+++ b/usr.sbin/pim6dd/debug.c   Wed Jul 21 02:02:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: debug.c,v 1.1 1999/07/17 14:06:24 itojun Exp $ */
+/*     $NetBSD: debug.c,v 1.2 1999/07/21 02:02:27 mjacob Exp $ */
 
 /*
  *  Copyright (c) 1998 by the University of Southern California.
@@ -345,8 +345,10 @@
      * or if we're debugging.
      */
     if (haveterminal && (debug || severity <= LOG_WARNING)) {
+       time_t sectime;
        gettimeofday(&now,NULL);
-       thyme = localtime(&now.tv_sec);
+       sectime = (time_t) now.tv_sec;
+       thyme = localtime(&sectime);
        if (!debug)
            fprintf(stderr, "%s: ", progname);
        fprintf(stderr, "%02d:%02d:%02d.%03ld %s", thyme->tm_hour,



Home | Main Index | Thread Index | Old Index