]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - libcurl.c
Clarify comment in CURL_fwrite.
[xonotic/darkplaces.git] / libcurl.c
index fd1671ff7344ea45bf7443950bde8b6081986950..43051547159b8c674c89fc6b089c802960b861b9 100644 (file)
--- a/libcurl.c
+++ b/libcurl.c
@@ -430,7 +430,10 @@ static size_t CURL_fwrite(void *data, size_t size, size_t nmemb, void *vdi)
 
        di->bytes_received += bytes;
 
-       return ret; // why not ret / nmemb?
+       return ret;
+       // Why not ret / nmemb?
+       // Because CURLOPT_WRITEFUNCTION docs say to return the number of bytes.
+       // Yes, this is incompatible to fwrite(2).
 }
 
 typedef enum