mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 09:27:04 +00:00
Fix time struct related warning
This commit is contained in:
parent
f2d6e10b4f
commit
66c2e16c70
1 changed files with 2 additions and 2 deletions
|
@ -691,12 +691,12 @@ int ssl_print_timestamp(ssl,ts)
|
||||||
struct timeval dt;
|
struct timeval dt;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
char ts_str[16];
|
char ts_str[17];
|
||||||
struct json_object *jobj;
|
struct json_object *jobj;
|
||||||
jobj = ssl->cur_json_st;
|
jobj = ssl->cur_json_st;
|
||||||
|
|
||||||
if(jobj) {
|
if(jobj) {
|
||||||
snprintf(ts_str,16, "%d%c%4.4d",ts->tv_sec,'.',ts->tv_usec/100);
|
snprintf(ts_str,17, "%ld%c%4.4ld",ts->tv_sec,'.',ts->tv_usec/100);
|
||||||
json_object *j_ts_str = json_object_new_string(ts_str);
|
json_object *j_ts_str = json_object_new_string(ts_str);
|
||||||
json_object_object_add(jobj, "timestamp", j_ts_str);
|
json_object_object_add(jobj, "timestamp", j_ts_str);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue