Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/78620910e89ce312525ab8f04ba5782e0aeaf440
...commit
http://git.netsurf-browser.org/netsurf.git/commit/78620910e89ce312525ab8f04ba5782e0aeaf440
...tree
http://git.netsurf-browser.org/netsurf.git/tree/78620910e89ce312525ab8f04ba5782e0aeaf440
The branch, master has been updated
via 78620910e89ce312525ab8f04ba5782e0aeaf440 (commit)
from 137bba297832fca352cf99a5fc0251ba3e251d91 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/78620910e89ce312525ab8f04ba5782e0aeaf440
commit 78620910e89ce312525ab8f04ba5782e0aeaf440
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
check all return values of string comparisons
diff --git a/content/fetch.c b/content/fetch.c
index 8c725af..2b16512 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -291,9 +291,15 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
*/
bool match1;
bool match2;
- lwc_string_isequal(scheme, ref_scheme, &match);
- lwc_string_isequal(scheme, fetch_https_lwc, &match1);
- lwc_string_isequal(ref_scheme, fetch_http_lwc, &match2);
+ if (lwc_string_isequal(scheme, ref_scheme, &match) !=
lwc_error_ok) {
+ match = false;
+ }
+ if (lwc_string_isequal(scheme, fetch_https_lwc,
&match1) != lwc_error_ok) {
+ match1 = false;
+ }
+ if (lwc_string_isequal(ref_scheme, fetch_http_lwc,
&match2) != lwc_error_ok) {
+ match2= false;
+ }
if (match == true || (match1 == true && match2 == true))
fetch->send_referer = true;
}
@@ -306,8 +312,7 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
/* Pick the scheme ops */
while (fetcher) {
- lwc_string_isequal(fetcher->scheme_name, scheme, &match);
- if (match == true) {
+ if ((lwc_string_isequal(fetcher->scheme_name, scheme, &match)
== lwc_error_ok) && (match == true)) {
fetch->ops = fetcher;
break;
}
@@ -542,9 +547,9 @@ bool fetch_can_fetch(const nsurl *url)
lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
while (fetcher != NULL) {
- lwc_string_isequal(fetcher->scheme_name, scheme, &match);
- if (match == true)
+ if (lwc_string_isequal(fetcher->scheme_name, scheme, &match) ==
lwc_error_ok && match == true) {
break;
+ }
fetcher = fetcher->next_fetcher;
}
-----------------------------------------------------------------------
Summary of changes:
content/fetch.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/content/fetch.c b/content/fetch.c
index 8c725af..2b16512 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -291,9 +291,15 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
*/
bool match1;
bool match2;
- lwc_string_isequal(scheme, ref_scheme, &match);
- lwc_string_isequal(scheme, fetch_https_lwc, &match1);
- lwc_string_isequal(ref_scheme, fetch_http_lwc, &match2);
+ if (lwc_string_isequal(scheme, ref_scheme, &match) !=
lwc_error_ok) {
+ match = false;
+ }
+ if (lwc_string_isequal(scheme, fetch_https_lwc,
&match1) != lwc_error_ok) {
+ match1 = false;
+ }
+ if (lwc_string_isequal(ref_scheme, fetch_http_lwc,
&match2) != lwc_error_ok) {
+ match2= false;
+ }
if (match == true || (match1 == true && match2 == true))
fetch->send_referer = true;
}
@@ -306,8 +312,7 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
/* Pick the scheme ops */
while (fetcher) {
- lwc_string_isequal(fetcher->scheme_name, scheme, &match);
- if (match == true) {
+ if ((lwc_string_isequal(fetcher->scheme_name, scheme, &match)
== lwc_error_ok) && (match == true)) {
fetch->ops = fetcher;
break;
}
@@ -542,9 +547,9 @@ bool fetch_can_fetch(const nsurl *url)
lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
while (fetcher != NULL) {
- lwc_string_isequal(fetcher->scheme_name, scheme, &match);
- if (match == true)
+ if (lwc_string_isequal(fetcher->scheme_name, scheme, &match) ==
lwc_error_ok && match == true) {
break;
+ }
fetcher = fetcher->next_fetcher;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org