summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMitchell Blank Jr <mitch@bodyfour.com>2020-10-13 16:11:27 +0100
committerMitchell Blank Jr <mitch@bodyfour.com>2020-10-13 16:11:27 +0100
commit988c7a47e02803d1e1b36e7c440edb8e7dd8ebd8 (patch)
treee57881449ef19a81581e97294dc6a4db09909003 /src
parent10addba7f2bf20c300a1b4957f49a83cb8aa2c02 (diff)
downloaddistcc-git-988c7a47e02803d1e1b36e7c440edb8e7dd8ebd8.tar.gz
Fix bug indicated by clang warning:
src/clirpc.c:126:9: warning: code will never be executed [-Wunreachable-code] It looks like ~12 years ago someone added a log statement to this if() block while they had Python on their mind. This means that the "expected version" check has been broken that entire time.
Diffstat (limited to 'src')
-rw-r--r--src/clirpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clirpc.c b/src/clirpc.c
index 606f910..fa0dfad 100644
--- a/src/clirpc.c
+++ b/src/clirpc.c
@@ -114,7 +114,7 @@ int dcc_r_result_header(int ifd,
unsigned vers;
int ret;
- if ((ret = dcc_r_token_int(ifd, "DONE", &vers)))
+ if ((ret = dcc_r_token_int(ifd, "DONE", &vers))) {
rs_log_error("server provided no answer. "
"Is the server configured to allow access from your IP"
" address? Is the server performing authentication and"
@@ -122,6 +122,7 @@ int dcc_r_result_header(int ifd,
" installed? Is the server configured to access the"
" compiler?");
return ret;
+ }
if (vers != expect_ver) {
rs_log_error("got version %d not %d in response from server",