events: fix sprintf warnings + simplified qt connect

This commit is contained in:
Stéphane Lepin
2019-04-17 14:03:58 +02:00
committed by Stéphane L
parent ca8848827e
commit 1907f8d1d1

View File

@ -51,8 +51,7 @@ const char* nsToTimestamp(uint64_t ns) {
uint64_t msPart = ms % 1000; uint64_t msPart = ms % 1000;
char* ts = (char*)bmalloc(64); char* ts = (char*)bmalloc(64);
sprintf(ts, "%02d:%02d:%02d.%03d", sprintf(ts, "%02lu:%02lu:%02lu.%03lu", hoursPart, minutesPart, secsPart, msPart);
hoursPart, minutesPart, secsPart, msPart);
return ts; return ts;
} }