diff --git a/api.c b/api.c index cfa3af52..fa454bcb 100644 --- a/api.c +++ b/api.c @@ -1005,7 +1005,7 @@ static struct api_data *print_data(struct api_data *root, char *buf, bool isjson sprintf(buf, "%s", *((bool *)(root->data)) ? TRUESTR : FALSESTR); break; case API_TIMEVAL: - snprintf(buf, sizeof(buf), "%"PRIu64".%06lu", + sprintf(buf, "%"PRIu64".%06lu", (uint64_t)((struct timeval *)(root->data))->tv_sec, (unsigned long)((struct timeval *)(root->data))->tv_usec); break;