aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-09-16 14:38:18 +0000
committerYang Tse <yangsita@gmail.com>2009-09-16 14:38:18 +0000
commit3eee678ab13be2fe2ef7d13d091e0101b8732eac (patch)
treea54979ce40fb5e2a836f08298d7aec22d87b551a /src
parent62ed553054c66b8a7f2728867f472cb4f496139a (diff)
Attempt to silence bogus compiler warning: "Potential null pointer dereference through ptr is detected"
Diffstat (limited to 'src')
-rw-r--r--src/writeout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/writeout.c b/src/writeout.c
index 4f94bab02..14ba41b92 100644
--- a/src/writeout.c
+++ b/src/writeout.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -120,7 +120,7 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
char *end;
char keepit;
int i;
- if(('{' == ptr[1]) && (end=strchr(ptr, '}'))) {
+ if(('{' == ptr[1]) && ((end = strchr(ptr, '}')) != NULL)) {
bool match = FALSE;
ptr+=2; /* pass the % and the { */
keepit=*end;
@@ -254,7 +254,7 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
break;
}
}
- if(!match) {
+ if(FALSE == match) {
fprintf(stderr, "curl: unknown --write-out variable: '%s'\n", ptr);
}
ptr=end+1; /* pass the end */