Re: cvs: php-src /ext/standard filestat.c /main php_streams.h /main/streams plain_wrapper.c
| From: | Andi Gutmans | Date: | Mon, 01 Dec 2003 20:28:34 +0000 |
| Subject: | Re: cvs: php-src /ext/standard filestat.c /main php_streams.h /main/streams plain_wrapper.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-24800@lists.php.net to get a copy of this message | ||
At 07:47 PM 12/1/2003 +0000, Sara Golemon wrote:
+ if (strncmp(url, "file://", 7) == 0) {
+ url += 7;
+ }
Hi Sara,
Please when you write such code don't use constant numbers but sizeof.
It should look something like:
+ if (strncmp(url, "file://", sizeof("file://")-1) == 0) {
+ url += sizeof("file://")-1);
+ }
Not sure if the strncmp() should be with the -1 or not.
Andi