aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-02 19:40:53 +0200
committerYang Tse <yangsita@gmail.com>2011-09-02 19:40:53 +0200
commit9194e1700312f27c6e2abdfb1f604e130497e887 (patch)
treeb8aff846ffca0041e9865850875025968fa9fc7e /lib/transfer.c
parent749dbfbc87d6043c4bfb57041ecbf2be6a1d42bb (diff)
MemoryTracking: fix logging of free() calls done where Curl_safefree is called
Just internal stuff... Curl_safefree is now a macro defined in memdebug.h instead of a function prototyped in url.h and implemented in url.c, so inclusion of url.h is no longer required in order to simply use Curl_safefree. Provide definition of macro WHILE_FALSE in setup_once.h in order to allow other macros such as DEBUGF and DEBUGASSERT, and code using it, to compile without 'conditional expression is constant' warnings. The WHILE_FALSE stuff fixes 150+ MSVC compiler warnings.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index b0ae8f02a..dbb06dbd5 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -800,6 +800,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
/*
* We loop here to do the READ and SEND loop until we run out of
* data to send or until we get EWOULDBLOCK back
+ *
+ * FIXME: above comment is misleading. Currently no looping is
+ * actually done in do-while loop below.
*/
do {
@@ -971,7 +974,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
Curl_pgrsSetUploadCounter(data, k->writebytecount);
- } while(0); /* just to break out from! */
+ } WHILE_FALSE; /* just to break out from! */
return CURLE_OK;
}