aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-09-18 15:10:22 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-09-18 15:42:41 -0700
commit06312bdb43c66150e59958479640913c3726ee10 (patch)
tree1308fc9cfbc3e62297e2c37d5ad25f1b6e716cc4 /src
parente203067bdcd9522446aa106ce77085c62a932c49 (diff)
Minor formatting, commenting and clang format for C to C++ conversion
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.c2
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.c6
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.c6
4 files changed, 12 insertions, 4 deletions
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
index 9975b1ef79..04379975e1 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
@@ -276,7 +276,7 @@ static void on_txt_done_cb(void *arg, int status, int timeouts,
char *error_msg;
grpc_ares_request *r = (grpc_ares_request *)arg;
const size_t prefix_len = sizeof(g_service_config_attribute_prefix) - 1;
- struct ares_txt_ext *result;
+ struct ares_txt_ext *result = NULL;
struct ares_txt_ext *reply = NULL;
grpc_error *error = GRPC_ERROR_NONE;
gpr_mu_lock(&r->mu);
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
index 52c9e217f1..9dfbd3c3a9 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
@@ -53,7 +53,7 @@
static grpc_slice_refcount terminal_slice_refcount = {NULL, NULL};
static const grpc_slice terminal_slice = {
&terminal_slice_refcount, /* refcount */
- {{0, 0}} /* refcounted */
+ {{0, 0}} /* data.refcounted */
};
extern grpc_tracer_flag grpc_http_trace;
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.c b/src/core/lib/iomgr/ev_epoll1_linux.c
index b5066e5f58..7fde45865e 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.c
+++ b/src/core/lib/iomgr/ev_epoll1_linux.c
@@ -568,7 +568,11 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
return 0;
}
- static const gpr_timespec round_up = {0, GPR_NS_PER_MS - 1, GPR_TIMESPAN};
+ static const gpr_timespec round_up = {
+ 0, /* tv_sec */
+ GPR_NS_PER_MS - 1, /* tv_nsec */
+ GPR_TIMESPAN /* clock_type */
+ };
timeout = gpr_time_sub(deadline, now);
int millis = gpr_time_to_millis(gpr_time_add(timeout, round_up));
return millis >= 1 ? millis : 1;
diff --git a/src/core/lib/iomgr/ev_epollex_linux.c b/src/core/lib/iomgr/ev_epollex_linux.c
index 671c4cd730..cff0c07a2b 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.c
+++ b/src/core/lib/iomgr/ev_epollex_linux.c
@@ -706,7 +706,11 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
return 0;
}
- static const gpr_timespec round_up = {0, GPR_NS_PER_MS - 1, GPR_TIMESPAN};
+ static const gpr_timespec round_up = {
+ 0, /* tv_sec */
+ GPR_NS_PER_MS - 1, /* tv_nsec */
+ GPR_TIMESPAN /* clock_type */
+ };
timeout = gpr_time_sub(deadline, now);
int millis = gpr_time_to_millis(gpr_time_add(timeout, round_up));
return millis >= 1 ? millis : 1;