From 9e661601feba03d1158ac466a457d5a6ce7f3f11 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Wed, 11 Mar 2015 18:15:33 +0100 Subject: 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 --- lib/formdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/formdata.c') 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 */ -- cgit v1.2.3