summaryrefslogtreecommitdiff
path: root/src/tool_easysrc.c
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-09-06 21:00:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-09-06 21:00:26 +0200
commit8b5d05026752b81532d4b1008266ab37bae39be2 (patch)
treec568db043eec946c4328753e671c222dea783a69 /src/tool_easysrc.c
parent2e7d2c8f7497d8eca30be1b98c9d0c80ef26e55f (diff)
downloadcurl-8b5d05026752b81532d4b1008266ab37bae39be2.tar.gz
tool_easysrc.c: Test pointers against NULL
While validating a new Clang diagnostic (-Wnon-literal-null-conversion - yes, the name isn't quite correct in this case, but it suffices) I found a few violations of it in Curl.
Diffstat (limited to 'src/tool_easysrc.c')
-rw-r--r--src/tool_easysrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
index 555ab0a18..339dde563 100644
--- a/src/tool_easysrc.c
+++ b/src/tool_easysrc.c
@@ -140,7 +140,7 @@ CURLcode easysrc_perform(void)
const char *c;
CHKRET(easysrc_add(&easysrc_code, ""));
/* Preamble comment */
- for(i=0; ((c = srchard[i]) != '\0'); i++)
+ for(i=0; ((c = srchard[i]) != NULL); i++)
CHKRET(easysrc_add(&easysrc_code, c));
/* Each unconverted option */
for(ptr=easysrc_toohard; ptr; ptr = ptr->next)
@@ -185,7 +185,7 @@ void dumpeasysrc(struct Configurable *config)
int i;
const char *c;
- for(i=0; ((c = srchead[i]) != '\0'); i++)
+ for(i=0; ((c = srchead[i]) != NULL); i++)
fprintf(out, "%s\n", c);
/* Declare variables used for complex setopt values */
@@ -213,7 +213,7 @@ void dumpeasysrc(struct Configurable *config)
for(ptr=easysrc_clean; ptr; ptr = ptr->next)
fprintf(out, " %s\n", ptr->data);
- for(i=0; ((c = srcend[i]) != '\0'); i++)
+ for(i=0; ((c = srcend[i]) != NULL); i++)
fprintf(out, "%s\n", c);
if(fopened)