Skip to content

Commit 3d1fb76

Browse files
peffjrn
authored andcommitted
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 <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]>
1 parent 02a110a commit 3d1fb76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static int http_get_file(const char *url, const char *filename, int options)
941941

942942
strbuf_addf(&tmpfile, "%s.temp", filename);
943943
result = fopen(tmpfile.buf, "a");
944-
if (! result) {
944+
if (!result) {
945945
error("Unable to open local file %s", tmpfile.buf);
946946
ret = HTTP_ERROR;
947947
goto cleanup;
@@ -950,7 +950,7 @@ static int http_get_file(const char *url, const char *filename, int options)
950950
ret = http_request_reauth(url, NULL, result, HTTP_REQUEST_FILE, options);
951951
fclose(result);
952952

953-
if ((ret == HTTP_OK) && move_temp_to_file(tmpfile.buf, filename))
953+
if (ret == HTTP_OK && move_temp_to_file(tmpfile.buf, filename))
954954
ret = HTTP_ERROR;
955955
cleanup:
956956
strbuf_release(&tmpfile);

0 commit comments

Comments
 (0)