summaryrefslogtreecommitdiff
path: root/lib/strerror.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-10-23 22:56:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-10-24 08:23:19 +0200
commit0eb3d15ccb419bfda41ee31bdbf73c36facc7388 (patch)
tree0c4abf7bf4bac279cbcfd708e1cdd1bcdf29bb77 /lib/strerror.c
parent1752e9c088d9bb7a3156dba9c66f7f64dd87afa9 (diff)
downloadcurl-0eb3d15ccb419bfda41ee31bdbf73c36facc7388.tar.gz
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)
Diffstat (limited to 'lib/strerror.c')
-rw-r--r--lib/strerror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/strerror.c b/lib/strerror.c
index 6e75579ff..b85b56839 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -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";