summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-09-28 08:31:00 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2013-09-30 20:04:31 (GMT)
commit3d1fb769b26dbf278a0ef0cf7427aac86a161bb0 (patch)
treef43c2250187e8e2d07ce968ff4b64cb3a2074636 /http.c
parent02a110ad435a6ccda648f09f94e546dfd7bdd0ac (diff)
downloadgit-3d1fb769b26dbf278a0ef0cf7427aac86a161bb0.zip
git-3d1fb769b26dbf278a0ef0cf7427aac86a161bb0.tar.gz
git-3d1fb769b26dbf278a0ef0cf7427aac86a161bb0.tar.bz2
http_get_file: style fixes
Besides being ugly, the extra parentheses are idiomatic for suppressing compiler warnings when we are assigning within a conditional. We aren't doing that here, and they just confuse the reader. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 2d086ae..9b10158 100644
--- a/http.c
+++ b/http.c
@@ -941,7 +941,7 @@ static int http_get_file(const char *url, const char *filename, int options)
strbuf_addf(&tmpfile, "%s.temp", filename);
result = fopen(tmpfile.buf, "a");
- if (! result) {
+ if (!result) {
error("Unable to open local file %s", tmpfile.buf);
ret = HTTP_ERROR;
goto cleanup;
@@ -950,7 +950,7 @@ static int http_get_file(const char *url, const char *filename, int options)
ret = http_request_reauth(url, NULL, result, HTTP_REQUEST_FILE, options);
fclose(result);
- if ((ret == HTTP_OK) && move_temp_to_file(tmpfile.buf, filename))
+ if (ret == HTTP_OK && move_temp_to_file(tmpfile.buf, filename))
ret = HTTP_ERROR;
cleanup:
strbuf_release(&tmpfile);