grpc/0003-tcp_posix.cc-fix-typo-...

29 lines
1018 B
Diff

From aefd1a3782bf67e894bfcaeaacb961ee2e3b9b68 Mon Sep 17 00:00:00 2001
From: Sergey Avseyev <sergey.avseyev@gmail.com>
Date: Wed, 16 Jan 2019 19:32:40 +0300
Subject: [PATCH] tcp_posix.cc: fix typo in bitwise condition
src/core/lib/iomgr/tcp_posix.cc:725:40: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
if ((msg.msg_flags & MSG_CTRUNC) == 1) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
---
src/core/lib/iomgr/tcp_posix.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index c268c18664..03077e3a0d 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -722,7 +722,7 @@ static void process_errors(grpc_tcp* tcp) {
return;
}
if (grpc_tcp_trace.enabled()) {
- if ((msg.msg_flags & MSG_CTRUNC) == 1) {
+ if (msg.msg_flags & MSG_CTRUNC) {
gpr_log(GPR_INFO, "Error message was truncated.");
}
}
--
2.20.1