Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time Only advance the time if we are skipping the gap.



details:   https://anonhg.NetBSD.org/src/rev/6dd3bf11e736
branches:  trunk
changeset: 770670:6dd3bf11e736
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 28 21:51:06 2011 +0000

description:
Only advance the time if we are skipping the gap.

diffstat:

 lib/libc/time/localtime.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 792987a6fc4e -r 6dd3bf11e736 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Fri Oct 28 20:13:32 2011 +0000
+++ b/lib/libc/time/localtime.c Fri Oct 28 21:51:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.61 2011/10/28 13:53:06 christos Exp $  */
+/*     $NetBSD: localtime.c,v 1.62 2011/10/28 21:51:06 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.61 2011/10/28 13:53:06 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.62 2011/10/28 21:51:06 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1934,7 +1934,9 @@
                                                break;
                                }
                                if (off) {
-                                       t = hi + off;
+                                       t = hi;
+                                       if (off > 0)
+                                               t += off;
                                        break;
                                }
                        }



Home | Main Index | Thread Index | Old Index