Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73055 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41428 invoked from network); 11 Mar 2014 06:14:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2014 06:14:45 -0000 Authentication-Results: pb1.pair.com header.from=tigger.on@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tigger.on@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.181 as permitted sender) X-PHP-List-Original-Sender: tigger.on@gmail.com X-Host-Fingerprint: 209.85.192.181 mail-pd0-f181.google.com Received: from [209.85.192.181] ([209.85.192.181:57219] helo=mail-pd0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/F0-29501-3D9AE135 for ; Tue, 11 Mar 2014 01:14:43 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so8073119pdj.40 for ; Mon, 10 Mar 2014 23:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2+K7C0WnAGfJwKpMwBYQ1KhC2JmbjDx9lRWu0fBYDrM=; b=MCtmoZMtXnpFa994paShbZo+uNGu946FN7VSINrA/1GQTcqFk+HaDy/u58t4DInlGK vRTHlBazkFc3gtqNIsqDTONPrdP8WvzSHBpXaSlmY0tx2KpJ3MNXUk8xminbKNepHuNW JsSwceT6T3tRimJBGp7+x0zoqFdl504ayQ1qLhS/KEhWa3EnXIo1QzWioDoHkLuv0zqD DK6XYUvdafcqLP3Or2vjqbW+DK8HYo0Oq/x1Vbf93y3ESmKWwvbqVrUeciJxylO9q0vs SxiJIMD8GIlJsw4MdqKA2HTzR4vQHKOpENRvN4f/QioTTkaD1Eolv7Opa94EDpK9RFpR uXgQ== MIME-Version: 1.0 X-Received: by 10.68.197.66 with SMTP id is2mr45081875pbc.96.1394518480439; Mon, 10 Mar 2014 23:14:40 -0700 (PDT) Received: by 10.66.47.97 with HTTP; Mon, 10 Mar 2014 23:14:40 -0700 (PDT) Date: Tue, 11 Mar 2014 17:14:40 +1100 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Possible tweak for tm2unixtime.c From: tigger.on@gmail.com (Tig) 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. There may be a reason why that loop code is there, but I'm not seeing why. More than happy to be wrong. -Tig