aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-01-23 13:09:21 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-01-23 13:09:21 -0800
commitd09f8806a690c8f7c17d10667b066e6d927cf407 (patch)
tree73a0db69ffe6a019fa0a331c3c10177050951ec6 /src
parentbe6a3550de0b8b0aa82a67e8194f1758287ddce1 (diff)
Remove uses of sprintf
Diffstat (limited to 'src')
-rw-r--r--src/core/surface/completion_queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index e1cc114cda..2bf31c50a8 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -396,12 +396,13 @@ void grpc_event_finish(grpc_event *base) {
void grpc_cq_dump_pending_ops(grpc_completion_queue *cc) {
#ifndef NDEBUG
- char tmp[256];
+ char tmp[GRPC_COMPLETION_DO_NOT_USE * (1 + GPR_LTOA_MIN_BUFSIZE)];
char *p = tmp;
int i;
for (i = 0; i < GRPC_COMPLETION_DO_NOT_USE; i++) {
- p += sprintf(p, " %d", (int)cc->pending_op_count[i]);
+ *p++ = ' ';
+ p += gpr_ltoa(cc->pending_op_count[i], p);
}
gpr_log(GPR_INFO, "pending ops:%s", tmp);