public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/487] New: redundant check in mktime.c TEST code
@ 2004-10-27 22:00 eggert at gnu dot org
  2004-11-01  0:21 ` [Bug libc/487] " cvs-commit@gcc.gnu.org
  2004-11-10 23:55 ` eggert@gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: eggert at gnu dot org @ 2004-10-27 22:00 UTC (permalink / raw)
  To: glibc-bugs

Here's a patch to a minor inefficiency in mktime.c's test code.

2004-10-27  Derek R. Price  <derek@ximbiot.com>

	This change is imported from gnulib.
	* lib/mktime.c (not_equal_tm) [DEBUG]: Remove redundant check.

--- time/mktime.c	2004-10-24 16:23:08 -0700
+++ /tmp/mktime.c	2004-10-27 14:56:59 -0700
@@ -409,7 +409,6 @@ not_equal_tm (const struct tm *a, const 
 	  | (a->tm_mday ^ b->tm_mday)
 	  | (a->tm_mon ^ b->tm_mon)
 	  | (a->tm_year ^ b->tm_year)
-	  | (a->tm_mday ^ b->tm_mday)
 	  | (a->tm_yday ^ b->tm_yday)
 	  | (a->tm_isdst ^ b->tm_isdst));
 }

-- 
           Summary: redundant check in mktime.c TEST code
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: minor
          Priority: P3
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: eggert at gnu dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=487

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/487] redundant check in mktime.c TEST code
  2004-10-27 22:00 [Bug libc/487] New: redundant check in mktime.c TEST code eggert at gnu dot org
@ 2004-11-01  0:21 ` cvs-commit@gcc.gnu.org
  2004-11-10 23:55 ` eggert@gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit@gcc.gnu.org @ 2004-11-01  0:21 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-01 00:21 -------
Subject: Bug 487

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2004-11-01 00:21:28

Modified files:
	time           : mktime.c 

Log message:
	2004-10-27  Derek R. Price  <derek@ximbiot.com>
	
	[BZ #487] This change is imported from gnulib.
	* time/mktime.c (not_equal_tm) [DEBUG]: Remove redundant check.
	2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
	
	[BZ #473] Import from gnulib.  Revamp to avoid several problems near
	time_t extrema, and on hosts with 64-bit time_t and 32-bit int.
	This fixes Debian bug 177940.
	* time/mktime.c (TIME_T_MIDPOINT): New macro.
	(ydhms_diff): Renamed from ydhms_tm_diff, with a new signature,
	which avoids overflow problems on hosts with 64-bit time_t and
	32-bit int.  All callers changed.  Now an inline function.
	Verify at compile-time that long int is wide enough to avoid
	these overflow problems.
	(guess_time_tm): New function.
	(__mktime_internal): Use it.  Avoid overflow when computing yday on
	hosts with 64-bit long and 32-bit int.  Remove tests for 69;
	no longer needed.  Use if rather than #ifdef for LEAP_SECONDS_POSSIBLE
	so that the code is checked by more compilers.
	Do not rely on floating point to probe: stick to integer arithmetic,
	to avoid potential porting problems.
	Repair potential overflow correctly in the Southern Hemisphere.
	(localtime_offset): Add a FIXME for the case where time_t is unsigned.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/time/mktime.c.diff?cvsroot=glibc&r1=1.60&r2=1.61



-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=487

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/487] redundant check in mktime.c TEST code
  2004-10-27 22:00 [Bug libc/487] New: redundant check in mktime.c TEST code eggert at gnu dot org
  2004-11-01  0:21 ` [Bug libc/487] " cvs-commit@gcc.gnu.org
@ 2004-11-10 23:55 ` eggert@gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: eggert@gnu.org @ 2004-11-10 23:55 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From eggert at gnu dot org  2004-11-10 23:55 -------
Thanks for installing the fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=487

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-10 23:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 22:00 [Bug libc/487] New: redundant check in mktime.c TEST code eggert at gnu dot org
2004-11-01  0:21 ` [Bug libc/487] " cvs-commit@gcc.gnu.org
2004-11-10 23:55 ` eggert@gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).