mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
We don't care about the result of regexec(); only that it was successful or not
svn path=/trunk/netsurf/; revision=7612
This commit is contained in:
parent
2ba7092933
commit
6471f83c19
@ -179,7 +179,7 @@ url_func_result url_normalize(const char *url, char **result)
|
||||
|
||||
/* finally verify that it's actually an URL we're working on
|
||||
* (RFC regex too fussy to tolerate above WSP problems) */
|
||||
if ((m = regexec(&url_re, norm, 10, match, 0))) {
|
||||
if (regexec(&url_re, norm, 10, match, 0)) {
|
||||
LOG(("url '%s' failed to match regex", url));
|
||||
free(norm);
|
||||
*result = NULL;
|
||||
@ -188,11 +188,10 @@ url_func_result url_normalize(const char *url, char **result)
|
||||
|
||||
if (match[URL_RE_SCHEME].rm_so == -1) {
|
||||
/* scheme missing: add http:// and reparse */
|
||||
/* LOG(("scheme missing: using http"));*/
|
||||
memmove(norm + SLEN("http://"), norm, len + 1);
|
||||
memcpy(norm, "http://", SLEN("http://")); /* do NOT copy NUL */
|
||||
len += SLEN("http://");
|
||||
if ((m = regexec(&url_re, norm, 10, match, 0))) {
|
||||
if (regexec(&url_re, norm, 10, match, 0)) {
|
||||
LOG(("url '%s' failed to match regex", norm));
|
||||
free(norm);
|
||||
*result = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user