By checking for the validity of the Ecore_Con_Url struct before anything
else and merging some if's, the code can get much cleaner.
---
 src/lib/ecore_con/ecore_con_url.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con_url.c 
b/src/lib/ecore_con/ecore_con_url.c
index 0f56b55..be64054 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -935,11 +935,6 @@ EAPI Eina_Bool
 ecore_con_url_http_post_send(Ecore_Con_Url *url_con, void *httppost)
 {
 #ifdef HAVE_CURL
-   if (url_con->post)
-      curl_formfree(url_con->post);
-
-   url_con->post = NULL;
-
    if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
      {
         ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL,
@@ -947,13 +942,10 @@ ecore_con_url_http_post_send(Ecore_Con_Url *url_con, void 
*httppost)
         return EINA_FALSE;
      }
 
-   url_con->post = httppost;
-
-   if (url_con->active)
+   if ((url_con->active) || (!url_con->url))
       return EINA_FALSE;
 
-   if (!url_con->url)
-      return EINA_FALSE;
+   url_con->post = httppost;
 
    curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPPOST, httppost);
 
-- 
1.7.3.1


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to