php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60596 Code Cleanup Removing Superfluous If Statement
Submitted: 2011-12-22 20:15 UTC Modified: 2012-03-04 13:53 UTC
From: ircmaxell@php.net Assigned: nikic (profile)
Status: Closed Package: SPL related
PHP Version: trunk-SVN-2011-12-22 (SVN) OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ircmaxell@php.net
New email:
PHP Version: OS:

 

 [2011-12-22 20:15 UTC] ircmaxell@php.net
Description:
------------
The switch statement for spl_offset_convert_to_long has a superfluous IF statement  
that is unnecessary (and causes an unnecessary Z_TYPE_P macro expansion).

I've attached a patch which refactors this to remove the if statement.

I wasn't sure to classify this as a bug or not since it doesn't affect PHP at all, 
but it's just code-cleanup.

Anthony


Patches

PHP_trunk_spl_switch_cleanup.patch (last revision 2011-12-22 20:15 UTC by ircmaxell)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-04 13:52 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=323863
Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement

Cleanup only, no function change. Patch by ircmaxell.
 [2012-03-04 13:53 UTC] nikic@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-03-04 13:53 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2012-04-18 09:45 UTC] laruence@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4e2e632fbdd587de502b4db603b1e15a2176a633
Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement
 [2012-07-24 23:36 UTC] rasmus@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4e2e632fbdd587de502b4db603b1e15a2176a633
Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement
 [2013-11-17 09:33 UTC] laruence@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4e2e632fbdd587de502b4db603b1e15a2176a633
Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 09:01:23 2020 UTC