summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-02-26 10:57:00 +0000
committerMarcus Boerger <helly@php.net>2006-02-26 10:57:00 +0000
commit5a69b290824828833e3587cb04478316cae5e39c (patch)
treef1fc508b2375533384853944679d23a42a9c806c /ext/standard/string.c
parent84fc80064bf2630f622c24ae5c43ac05d5628608 (diff)
downloadphp-git-5a69b290824828833e3587cb04478316cae5e39c.tar.gz
- Warning fixes by Steph
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 545ceeebab..5ae92eeec7 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -237,7 +237,7 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior)
}
}
- if (((unsigned) start + (unsigned) len) > len1) {
+ if ((start + len) > len1) {
len = len1 - start;
}
@@ -1166,7 +1166,7 @@ quit_loop:
if (state == 1) {
cend = c;
}
- if (suffix != NULL && sufflen < (cend - comp) &&
+ if (suffix != NULL && sufflen < (uint)(cend - comp) &&
memcmp(cend - sufflen, suffix, sufflen) == 0) {
cend -= sufflen;
}
@@ -1983,7 +1983,7 @@ PHP_FUNCTION(substr)
RETURN_FALSE;
}
- if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(str)) {
+ if ((f + l) > Z_STRLEN_PP(str)) {
l = Z_STRLEN_PP(str) - f;
}
@@ -2080,7 +2080,7 @@ PHP_FUNCTION(substr_replace)
}
}
- if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(str)) {
+ if ((f + l) > Z_STRLEN_PP(str)) {
l = Z_STRLEN_PP(str) - f;
}
if (Z_TYPE_PP(repl) == IS_ARRAY) {
@@ -2176,7 +2176,7 @@ PHP_FUNCTION(substr_replace)
}
}
- if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(tmp_str)) {
+ if ((f + l) > Z_STRLEN_PP(tmp_str)) {
l = Z_STRLEN_PP(tmp_str) - f;
}