code cleanup: we prefer 'CURLcode result'
... for the local variable name in functions holding the return code. Using the same name universally makes code easier to read and follow. Also, unify code for checking for CURLcode errors with: if(result) or if(!result) instead of if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK)
This commit is contained in:
@@ -330,7 +330,7 @@ curl_easy_strerror(CURLcode error)
|
||||
*/
|
||||
return "Unknown error";
|
||||
#else
|
||||
if(error == CURLE_OK)
|
||||
if(!error)
|
||||
return "No error";
|
||||
else
|
||||
return "Error";
|
||||
@@ -597,7 +597,7 @@ get_winsock_error (int err, char *buf, size_t len)
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if(err == CURLE_OK)
|
||||
if(!err)
|
||||
return NULL;
|
||||
else
|
||||
p = "error";
|
||||
|
Reference in New Issue
Block a user