summaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-03-11 18:15:33 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-03-16 12:13:56 +0100
commit9e661601feba03d1158ac466a457d5a6ce7f3f11 (patch)
treef2c50d2dc10e01524a10a7113da2d566eb95fea4 /lib/formdata.c
parent29c655c0a6affc0359e499162e8308663eb4d04f (diff)
downloadcurl-9e661601feba03d1158ac466a457d5a6ce7f3f11.tar.gz
Bug #149: Deletion of unnecessary checks before a few calls of cURL functions
The following functions return immediately if a null pointer was passed. * Curl_cookie_cleanup * curl_formfree It is therefore not needed that a function caller repeats a corresponding check. This issue was fixed by using the software Coccinelle 1.0.0-rc24. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 3f41a4275..3076a1437 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -969,8 +969,7 @@ void curl_formfree(struct curl_httppost *form)
next=form->next; /* the following form line */
/* recurse to sub-contents */
- if(form->more)
- curl_formfree(form->more);
+ curl_formfree(form->more);
if(!(form->flags & HTTPPOST_PTRNAME))
free(form->name); /* free the name */