From b98aee7250c58ed9de85c10a54586e9382971139 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 10 Jun 2015 13:04:52 +0300 Subject: [PATCH] Coverity 1304851 --- .../linux/apps/uavcan_dynamic_node_id_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp b/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp index 7752d4d11a..ae1ef0c499 100644 --- a/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp +++ b/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp @@ -86,10 +86,10 @@ public: uavcan::MakeString<81>::Type toString() const // Heapless return { - char timebuf[11] = { }; + char timebuf[12] = { }; { const std::time_t rawtime = utc_timestamp.toUSec() * 1e-6; - const auto tm = localtime(&rawtime); + const auto tm = std::localtime(&rawtime); std::strftime(timebuf, 10, "%H:%M:%S.", tm); std::snprintf(&timebuf[9], 3, "%02u", static_cast((utc_timestamp.toMSec() % 1000U) / 10U)); }