Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73057 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51071 invoked from network); 11 Mar 2014 09:42:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2014 09:42:54 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.181 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.214.181 mail-ob0-f181.google.com Received: from [209.85.214.181] ([209.85.214.181:54568] helo=mail-ob0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/62-29501-C9ADE135 for ; Tue, 11 Mar 2014 04:42:52 -0500 Received: by mail-ob0-f181.google.com with SMTP id wp4so8113205obc.40 for ; Tue, 11 Mar 2014 02:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=R3r36fXE802TbjiFMt494WBvGNE480EgJ7SOtkiVkdU=; b=0Z9DGQCaGYBaT6gtco2wf6VJMsgqqmp3Q7+Oiake1aX2bTp2FazgFcknp+1vVlTkgs G1P5FqC7NZUy7gJGQDBj8mcphIwFOB+2BkEB41h6zAy44Sbk9x0CUTP94TEIyocFtBwi w6GGjP90lzujo/4VQyWAFUxuD5jPoXq6eb6isTV9KXUlcspTHu2Z9W1rjYraekdPCR6p ssV4PzjBB3k5A4m4DwcgI3SX2Ce9Ie0io8uht6jsLF2fDSl4sZCoi5W5QxXoIW+cVeIR QsRDmJN42ab6595/Ev/v5LpEYLSJNCIjRPblVSoIfxsZOf9sMmOGVMHn/2/6p0rYOtud Rn4w== MIME-Version: 1.0 X-Received: by 10.60.162.7 with SMTP id xw7mr10104013oeb.13.1394530969750; Tue, 11 Mar 2014 02:42:49 -0700 (PDT) Received: by 10.182.221.170 with HTTP; Tue, 11 Mar 2014 02:42:49 -0700 (PDT) In-Reply-To: References: Date: Tue, 11 Mar 2014 02:42:49 -0700 Message-ID: To: Tjerk Meesters Cc: Tig , PHP Internals Content-Type: multipart/alternative; boundary=047d7b33cd7c14922204f4518b70 Subject: Re: [PHP-DEV] Possible tweak for tm2unixtime.c From: kris.craig@gmail.com (Kris Craig) --047d7b33cd7c14922204f4518b70 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Mar 11, 2014 at 2:11 AM, Tjerk Meesters wrote: > On Tue, Mar 11, 2014 at 2:14 PM, Tig wrote: > > > Hello. I'm not sure, but I believe the following `do {} while` code is > > pointless in /ext/date/lib/tm2unixtime.c (located here: > > > > > https://github.com/php/php-src/blob/af6c11c5f060870d052a2b765dc634d9e47d0f18/ext/date/lib/tm2unixtime.c > > ) > > > > 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 > Do you recall which tests are those affected? --Kris --047d7b33cd7c14922204f4518b70--