Skip to content

Commit

Permalink
fix format warning
Browse files Browse the repository at this point in the history
  • Loading branch information
six-ddc committed Apr 2, 2017
1 parent 538247a commit 9a31494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http_flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static std::string timeval2tr(const struct timeval *ts) {
struct tm *local_tm = localtime(&ts->tv_sec);
std::string time_str;
time_str.resize(15);
sprintf(&time_str[0], "%02d:%02d:%02d.%06d", local_tm->tm_hour, local_tm->tm_min, local_tm->tm_sec, ts->tv_usec);
sprintf(&time_str[0], "%02d:%02d:%02d.%06d", local_tm->tm_hour, local_tm->tm_min, local_tm->tm_sec, (int)ts->tv_usec);
return time_str;
}

Expand Down

0 comments on commit 9a31494

Please sign in to comment.