diff options
author | Noah Eisen <ncteisen@google.com> | 2017-08-22 08:31:39 -0700 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2017-08-22 08:31:39 -0700 |
commit | 97472246468b5d705cf443b4eac3d857a68dbdbb (patch) | |
tree | cc9cee6fe44c5bbbbe68c59d42009f58522d9b5b | |
parent | 7d0d2cd7c526b91a6b8b2cefb0ab12091382f154 (diff) |
Fix ubsan
-rw-r--r-- | src/core/ext/transport/chttp2/transport/flow_control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ext/transport/chttp2/transport/flow_control.c b/src/core/ext/transport/chttp2/transport/flow_control.c index 8dbdd1290a..cec99f6fb6 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.c +++ b/src/core/ext/transport/chttp2/transport/flow_control.c @@ -482,8 +482,8 @@ grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action( double bw_dbl = -1; if (grpc_bdp_estimator_get_bw(&tfc->bdp_estimator, &bw_dbl)) { // we target the max of BDP or bandwidth in microseconds. - int32_t frame_size = - GPR_CLAMP(GPR_MAX((int32_t)bw_dbl / 1000, bdp), 16384, 16777215); + int32_t frame_size = (int32_t)GPR_CLAMP( + GPR_MAX((int32_t)bw_dbl / 1000, bdp), 16384, 16777215); grpc_chttp2_flowctl_urgency frame_size_urgency = delta_is_significant( tfc, frame_size, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE); if (frame_size_urgency != GRPC_CHTTP2_FLOWCTL_NO_ACTION_NEEDED) { |