|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-06-20 23:54 UTC] felipe@php.net
-Status: Open
+Status: Wont fix
[2010-06-20 23:54 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
Description: ------------ The patch is self-explanatory. (And easier to read than a description). It provides a (real little) performance improvement; but it is mainly for the idea. Reproduce code: --------------- Index: ext/standard/http.c =================================================================== --- ext/standard/http.c (revision 290576) +++ ext/standard/http.c (working copy) @@ -50,7 +50,7 @@ if (!arg_sep) { arg_sep = INI_STR("arg_separator.output"); - if (!arg_sep || !strlen(arg_sep)) { + if (!arg_sep || !*arg_sep) { arg_sep = URL_DEFAULT_ARG_SEP; } } Index: ext/pdo_dblib/dblib_stmt.c =================================================================== --- ext/pdo_dblib/dblib_stmt.c (revision 290576) +++ ext/pdo_dblib/dblib_stmt.c (working copy) @@ -118,7 +118,7 @@ S->cols[i].coltype = dbcoltype(H->link, i+1); S->cols[i].name = (char*)dbcolname(H->link, i+1); - if (!strlen(S->cols[i].name)) { + if (!*(S->cols[i].name)) { if (j) { spprintf(&tmp, 0, "computed%d", j++); strlcpy(S->cols[i].name, tmp, strlen(tmp)+1); Index: ext/mbstring/mbstring.c =================================================================== --- ext/mbstring/mbstring.c (revision 290576) +++ ext/mbstring/mbstring.c (working copy) @@ -2899,7 +2899,7 @@ i--; } - if (_from_encodings != NULL && !strlen(_from_encodings)) { + if (_from_encodings != NULL && !*_from_encodings) { efree(_from_encodings); _from_encodings = NULL; } Index: ext/dba/dba.c =================================================================== --- ext/dba/dba.c (revision 290576) +++ ext/dba/dba.c (working copy) @@ -457,7 +457,7 @@ { dba_handler *hptr; - if (!strlen(new_value)) { + if (!*new_value) { DBA_G(default_hptr) = NULL; return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); }