diff options
author | nnoble <nnoble@google.com> | 2014-12-11 16:36:46 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2014-12-12 16:13:24 -0800 |
commit | 8f4e42cfbc0832856559d1b2a6bcff0d62f4b401 (patch) | |
tree | bb88aa539f447548b81facb9a6865fa3fb71bf99 /src/core | |
parent | 9a58df08555ddd5a127dd64c36f4d1ba07ea0d0b (diff) |
Shutting off warning by properly truncating values.
Change on 2014/12/11 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81924726
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 8d73bd85e9..c70c660fbe 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -948,14 +948,14 @@ static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), gpr_realloc(t->pings, sizeof(outstanding_ping) * t->ping_capacity); } p = &t->pings[t->ping_count++]; - p->id[0] = t->ping_counter >> 56; - p->id[1] = t->ping_counter >> 48; - p->id[2] = t->ping_counter >> 40; - p->id[3] = t->ping_counter >> 32; - p->id[4] = t->ping_counter >> 24; - p->id[5] = t->ping_counter >> 16; - p->id[6] = t->ping_counter >> 8; - p->id[7] = t->ping_counter; + p->id[0] = (t->ping_counter >> 56) & 0xff; + p->id[1] = (t->ping_counter >> 48) & 0xff; + p->id[2] = (t->ping_counter >> 40) & 0xff; + p->id[3] = (t->ping_counter >> 32) & 0xff; + p->id[4] = (t->ping_counter >> 24) & 0xff; + p->id[5] = (t->ping_counter >> 16) & 0xff; + p->id[6] = (t->ping_counter >> 8) & 0xff; + p->id[7] = t->ping_counter & 0xff; p->cb = cb; p->user_data = user_data; gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); |