diff options
author | Zeev Suraski <zeev@php.net> | 2000-09-19 17:37:34 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-09-19 17:37:34 +0000 |
commit | c45b1c2c8b07d2950451980e04b4e50a6af6afb9 (patch) | |
tree | 0015346a7954940b42080862aac95148699c1348 /ext/standard/url_scanner.c | |
parent | ade9a02eef42806218d475009add2a967fb5aab0 (diff) | |
download | php-git-c45b1c2c8b07d2950451980e04b4e50a6af6afb9.tar.gz |
- Fix warnings
- Fix URL scanner startup crash
Diffstat (limited to 'ext/standard/url_scanner.c')
-rw-r--r-- | ext/standard/url_scanner.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c index 2a79ee97bd..3431dcaa64 100644 --- a/ext/standard/url_scanner.c +++ b/ext/standard/url_scanner.c @@ -35,22 +35,26 @@ #define BUFSIZE 256 #endif -PHP_RINIT_FUNCTION(url_scanner) { +PHP_RINIT_FUNCTION(url_scanner) +{ url_adapt(NULL,0,NULL,NULL); return SUCCESS; } -PHP_RSHUTDOWN_FUNCTION(url_scanner) { + +PHP_RSHUTDOWN_FUNCTION(url_scanner) +{ url_adapt(NULL,0,NULL,NULL); return SUCCESS; } -static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf) { +static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf) +{ int flag = 0; PLS_FETCH(); - if(!strcasecmp(tag,"a")&&!strcasecmp(attr,"href")) { + if(!strcasecmp(tag,"a") && !strcasecmp(attr,"href")) { flag = 1; } else if(!strcasecmp(tag,"area" ) && !strcasecmp(attr,"href" )) { flag = 1; @@ -100,9 +104,9 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen if(src==NULL) { US.state=STATE_NORMAL; - if(US.tag) {efree(US.tag); US.tag =NULL; } - if(US.attr) {efree(US.attr); US.attr=NULL; } - if(US.val) {efree(US.val); US.val =NULL; } + if(US.tag) { efree(US.tag); US.tag =NULL; } + if(US.attr) { efree(US.attr); US.attr=NULL; } + if(US.val) { efree(US.val); US.val =NULL; } return NULL; } |