]> granicus.if.org Git - php/commitdiff
MFB: clean some dead code
authorNuno Lopes <nlopess@php.net>
Tue, 23 Sep 2008 15:22:05 +0000 (15:22 +0000)
committerNuno Lopes <nlopess@php.net>
Tue, 23 Sep 2008 15:22:05 +0000 (15:22 +0000)
Zend/zend_constants.c
ext/iconv/iconv.c
ext/pcre/php_pcre.c
ext/standard/array.c
ext/standard/base64.c
ext/standard/image.c
ext/standard/versioning.c
main/rfc1867.c
main/streams/glob_wrapper.c

index ae267a5b4376827f6d373cf4e3354cde3346cd37..a617adcc7c98f95e6869f84b184f1a10f971ad6d 100644 (file)
@@ -458,7 +458,6 @@ ZEND_API int zend_u_get_constant_ex(zend_uchar type, zstr name, uint name_len, z
                                        name = constant_name;
                                        name_len = const_name_len;
                                        efree(class_name.v);
-                                       retval = 1;
                                        return zend_u_get_constant(type, name, name_len, result TSRMLS_CC);
                                }
                                if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
index f3b38f9339a1d1e0083c2c3d8315b22d2ca16aa4..2c41037c3f520fbd6dc9f1ed952d2be233fc342a 100644 (file)
@@ -1357,7 +1357,6 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
                                                char_cnt -= 3;
                                        }
                                }
-                               prev_in_left = in_left;
 
                                smart_str_appendl(pretval, "?=", sizeof("?=") - 1);
                                char_cnt -= 2;
index aa59fd4c67de3760a1441ff0af063acfdf3496f3..e03ffb3ad5d6a21433de2542c159546d68376b59 100644 (file)
@@ -1023,7 +1023,6 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject,
                                } else {
                                        esc_match = "";
                                        esc_match_len = 0;
-                                       match_len = 0;
                                }
                                smart_str_appendl(&code, esc_match, esc_match_len);
 
index 443d94e56d43b55b2f28c527f9e3a3a92e59b8c8..b5fefb72c21469d2999d002e5e0bbd6dd6ac973d 100644 (file)
@@ -3574,7 +3574,6 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
        } else if (behavior & DIFF_ASSOC) { /* triggered also if DIFF_KEY */
                /* DIFF_KEY is subset of DIFF_ASSOC. When having the former
                 * no comparison of the data is done (part of DIFF_ASSOC) */
-               diff_key_compare_func = php_array_key_compare;
 
                if (data_compare_type == DIFF_COMP_DATA_INTERNAL && key_compare_type == DIFF_COMP_KEY_INTERNAL) {
                        /* array_diff_assoc() or array_diff_key() */
index 5c7c639f7a0fae37ce6869409f23094beff4f9f2..f29ae75e02030acd6620f81b3b6ae74c2efffcb5 100644 (file)
@@ -190,7 +190,7 @@ PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length,
                case 2:
                        k++;
                case 3:
-                       result[k++] = 0;
+                       result[k] = 0;
                }
        }
        if(ret_length) {
index a83b9669c28533f5db74c89e53faa739e2c38219..5b4caa50179a6409b2be054776882ee7f010e1c2 100644 (file)
@@ -653,7 +653,7 @@ static struct gfxinfo *php_handle_jpc(php_stream * stream TSRMLS_DC)
        }
 
        /* Collect bit depth info */
-       highest_bit_depth = bit_depth = 0;
+       highest_bit_depth = 0;
        for (i = 0; i < result->channels; i++) {
                bit_depth = php_stream_getc(stream); /* Ssiz[i] */
                bit_depth++;
index 10d4d30e4097fe014a7623f10caa1cf83ca8925f..1ccc20a7877b5c3847a6ae712ef921f0725a8e77 100644 (file)
@@ -45,7 +45,7 @@ php_canonicalize_version(const char *version)
     p = version;
     q = buf;
     *q++ = lp = *p++;
-    lq = '\0';
+
     while (*p) {
 /*  s/[-_+]/./g;
  *  s/([^\d\.])([^\D\.])/$1.$2/g;
@@ -55,22 +55,22 @@ php_canonicalize_version(const char *version)
 #define isndig(x) (!isdigit(x)&&(x)!='.')
 #define isspecialver(x) ((x)=='-'||(x)=='_'||(x)=='+')
 
-        lq = *(q - 1);
+               lq = *(q - 1);
                if (isspecialver(*p)) {
                        if (lq != '.') {
-                               lq = *q++ = '.';
+                               *q++ = '.';
                        }
                } else if ((isndig(lp) && isdig(*p)) || (isdig(lp) && isndig(*p))) {
                        if (lq != '.') {
                                *q++ = '.';
                        }
-                       lq = *q++ = *p;
+                       *q++ = *p;
                } else if (!isalnum(*p)) {
                        if (lq != '.') {
-                               lq = *q++ = '.';
+                               *q++ = '.';
                        }
                } else {
-                       lq = *q++ = *p;
+                       *q++ = *p;
                }
                lp = *p++;
     }
index 25a813951a1f74901b35f3384a0b8f2ee6827def..5df37f44a102b096ad961d23a757d5afa6f9484d 100644 (file)
@@ -189,7 +189,8 @@ static void normalize_protected_variable(char *varname TSRMLS_DC)
                        index = NULL;
                }       
        }
-       *s++='\0';
+
+       *s = '\0';
 }
 
 
@@ -784,7 +785,7 @@ static char *substring_conf(char *start, int len, char quote TSRMLS_DC)
                }
        }
 
-       *resp++ = '\0';
+       *resp = '\0';
        return result;
 }
 
index afc4e128e83a3ff789c130dd9020271a04472540..48974d841de73f5deb80faa3d9faab209dfdb525 100755 (executable)
@@ -209,7 +209,7 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat
                int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)
 {
        glob_s_t *pglob;
-       int ret, path_len;
+       int ret;
        char *tmp, *pos;
 
        if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) {
@@ -218,12 +218,9 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat
 
        if (!strncmp(path, "glob://", sizeof("glob://")-1)) {
                path += sizeof("glob://")-1;
-               path_len = strlen(path);
                if (opened_path) {
-                       *opened_path = estrndup(path, path_len);
+                       *opened_path = estrdup(path);
                }
-       } else {
-               path_len = strlen(path);
        }
 
        pglob = ecalloc(sizeof(*pglob), 1);