From 402c4ca66c7d95b1cdfc9eefbcb94947c807155b Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sat, 14 Aug 2004 14:30:12 +0000 Subject: [project @ 2004-08-14 14:30:10 by joty] Removed a chunk of Norcroft compiler warnings. Re-ident some pieces. svn path=/import/netsurf/; revision=1231 --- content/fetch.c | 2 +- content/fetchcache.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'content') diff --git a/content/fetch.c b/content/fetch.c index cb1353f98..1ea20a8a0 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -384,7 +384,7 @@ CURLcode fetch_set_options(struct fetch *f) SETOPT(CURLOPT_COOKIEFILE, 0); SETOPT(CURLOPT_COOKIEJAR, 0); } - if ((li = login_list_get(f->url))) { + if ((li = login_list_get(f->url)) != NULL) { SETOPT(CURLOPT_HTTPAUTH, CURLAUTH_ANY); SETOPT(CURLOPT_USERPWD, li->logindetails); } else { diff --git a/content/fetchcache.c b/content/fetchcache.c index 02ce109b1..54fd7e1c8 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -72,19 +72,17 @@ struct content * fetchcache(const char *url, char *url1; char *hash; - url1 = strdup(url); - if (!url1) - return 0; + if ((url1 = strdup(url)) == NULL) + return NULL; /* strip fragment identifier */ - if ((hash = strchr(url1, '#'))) - *hash = 0; + if ((hash = strchr(url1, '#')) != NULL) + *hash = NULL; LOG(("url %s", url1)); if (!post_urlenc && !post_multipart) { - c = content_get(url1); - if (c) { + if ((c = content_get(url1)) != NULL) { free(url1); content_add_user(c, callback, p1, p2); return c; @@ -94,7 +92,7 @@ struct content * fetchcache(const char *url, c = content_create(url1); free(url1); if (!c) - return 0; + return NULL; content_add_user(c, callback, p1, p2); if (!post_urlenc && !post_multipart) -- cgit v1.2.3