From 3b1faf9c91d1fd7d1bb26b744bf0a84c631806f0 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 12 Sep 2017 17:12:57 +0200 Subject: Fix incorrect usage of gmtime_r in timestamp decoder --- src/TimestampDecoder.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/TimestampDecoder.cpp') diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp index ba1a221..ddd3fb7 100644 --- a/src/TimestampDecoder.cpp +++ b/src/TimestampDecoder.cpp @@ -38,10 +38,10 @@ #define MDEBUG(fmt, args...) PDEBUG(fmt, ## args) -void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) +void TimestampDecoder::calculateTimestamp(frame_timestamp& ts) { - std::shared_ptr ts_queued = - std::make_shared(); + std::shared_ptr ts_queued = + std::make_shared(); /* Push new timestamp into queue */ ts_queued->timestamp_valid = full_timestamp_received; @@ -115,7 +115,10 @@ void TimestampDecoder::pushMNSCData(int framephase, uint16_t mnsc) mnsc0 = (struct eti_MNSC_TIME_0*)&mnsc; enableDecode = (mnsc0->type == 0) && (mnsc0->identifier == 0); - gmtime_r(0, &temp_time); + { + const time_t timep = 0; + gmtime_r(&timep, &temp_time); + } break; case 1: -- cgit v1.2.3