summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-11 14:38:10 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-11 14:38:10 +0100
commit2e869ade2a1ed2d13f3d831d3d1f933006cacbdd (patch)
treed68206b5b54a70f1c45ea84343f6a8b20ff6a21a /content
parent25cacb19c8e19bd715bca93b0e60d430ca739b61 (diff)
downloadnetsurf-2e869ade2a1ed2d13f3d831d3d1f933006cacbdd.tar.gz
Cleanup.
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 51eed0e2f..028fe9ee4 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -248,8 +248,7 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
/* The URL we're fetching must have a scheme */
scheme = nsurl_get_component(url, NSURL_SCHEME);
- if (scheme == NULL)
- goto failed;
+ assert(scheme != NULL);
#ifdef DEBUG_FETCH_VERBOSE
LOG(("fetch %p, url '%s'", fetch, nsurl_access(url)));
@@ -307,12 +306,10 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
lwc_string_unref(ref_scheme);
}
- if (fetch->url == NULL)
- goto failed;
-
/* Pick the scheme ops */
while (fetcher) {
- if ((lwc_string_isequal(fetcher->scheme_name, scheme, &match) == lwc_error_ok) && (match == true)) {
+ if ((lwc_string_isequal(fetcher->scheme_name, scheme,
+ &match) == lwc_error_ok) && (match == true)) {
fetch->ops = fetcher;
break;
}
@@ -343,8 +340,7 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
return fetch;
failed:
- if (scheme != NULL)
- lwc_string_unref(scheme);
+ lwc_string_unref(scheme);
if (fetch->host != NULL)
lwc_string_unref(fetch->host);