Re: Possible tweak for tm2unixtime.c

From: Date: Tue, 11 Mar 2014 09:11:26 +0000
Subject: Re: Possible tweak for tm2unixtime.c
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-73056@lists.php.net to get a copy of this message
On Tue, Mar 11, 2014 at 2:14 PM, Tig <tigger.on@gmail.com> wrote: > Hello. I'm not sure, but I believe the following do {} > while code is > pointless in /ext/date/lib/tm2unixtime.c (located here: > > Á > …Ãx > ) > > The code in question (appears a lot): > > do {} while (do_range_limit(0, 60, 60, &rt->s, &rt->i)); > > The method do_range_limit() will always return 0, so why not > just > call it like so: > > do_range_limit(0, 60, 60, &rt->s, &rt->i); > > And remove the do {} while loop. > I can only tell you that removing them will cause 14 test cases to fail. Unfortunately I can't tell you why that happens. > > There may be a reason why that loop code is there, but I'm not seeing > why. More than happy to be wrong. > > -Tig > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Tjerk

« previous php.internals (#73056) next »