summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2002-10-09 13:50:06 +0000
committerAndrey Hristov <andrey@php.net>2002-10-09 13:50:06 +0000
commit868ae8b6e02d6d75e995df59d0a70ba98831b214 (patch)
tree5826ec8a6cbbc0cc9c2a3c3f52e27a05db62f94f
parentf6f58fc3005c097c6f22473a82348a0c1819e987 (diff)
downloadphp-git-868ae8b6e02d6d75e995df59d0a70ba98831b214.tar.gz
ws fixes.
-rw-r--r--ext/standard/string.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index b5891d2290..c795394fdf 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2442,7 +2442,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
target = new_str;
if (PG(magic_quotes_sybase)) {
- while (source<end) {
+ while (source < end) {
switch (*source) {
case '\0':
*target++ = '\\';
@@ -2458,11 +2458,9 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
}
source++;
}
- }
- else {
- while (source<end) {
- switch (*source)
- {
+ } else {
+ while (source < end) {
+ switch (*source) {
case '\0':
*target++ = '\\';
*target++ = '0';
@@ -3054,7 +3052,7 @@ PHP_FUNCTION(nl2br)
/* it is really faster to scan twice and allocate mem once insted scanning once
and constantly reallocing */
- while (str<end) {
+ while (str < end) {
if (*str == '\r') {
if (*(str+1) == '\n') {
str++;
@@ -3079,9 +3077,8 @@ PHP_FUNCTION(nl2br)
str = Z_STRVAL_PP(zstr);
- while (str<end) {
- switch (*str)
- {
+ while (str < end) {
+ switch (*str) {
case '\r':
case '\n':
*target++ = '<';