Re: cvs: php-src /ext/standard url.c
| From: | Moriyoshi Koizumi | Date: | Wed, 03 Dec 2003 23:21:38 +0000 |
| Subject: | Re: cvs: php-src /ext/standard url.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-24884@lists.php.net to get a copy of this message | ||
Any reason to remove them? Passing a char-typed value to is*() or to*()
is basically wrong.
Moriyoshi
On 2003/12/04, at 7:51, Ilia Alshanetsky wrote:
iliaa Wed Dec 3 17:51:52 2003 EDT Modified files:/php-src/ext/standard url.cLog: Remove unnecessary casts. Index: php-src/ext/standard/url.c diff -u php-src/ext/standard/url.c:1.71 php-src/ext/standard/url.c:1.72 --- php-src/ext/standard/url.c:1.71 Wed Dec 3 15:58:12 2003 +++ php-src/ext/standard/url.c Wed Dec 3 17:51:51 2003 @@ -15,7 +15,7 @@| Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+*/ -/* $Id: url.c,v 1.71 2003/12/03 20:58:12 moriyoshi Exp $ */ +/* $Id: url.c,v 1.72 2003/12/03 22:51:51 iliaa Exp $ */ #include <stdlib.h> #include <string.h> @@ -104,7 +104,7 @@ * correctly parse things like a.com:80 */ p = e + 1; - while (isdigit((int)*(unsigned char *)p)) { + while (isdigit(p)) { p++; } @@ -151,7 +151,7 @@ p = e + 1; pp = p; - while (pp-p < 6 && isdigit((int)*(unsigned char *)pp)) { + while (pp-p < 6 && isdigit(pp)) { pp++; } @@ -457,7 +457,7 @@ while (len--) { if (*data == '+') *dest = ' '; - else if (*data == '%' && len >= 2 && isxdigit((int) *(unsigned char *)(data + 1)) && isxdigit((int) *(unsigned char *)(data + 2))) { + else if (*data == '%' && len >= 2 && isxdigit((int) *(data + 1)) && isxdigit((int) *(data + 2))) { #ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); #else --PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php