AP_UAVCAN: fixed build on Linux

This commit is contained in:
Andrew Tridgell 2019-12-31 08:41:18 +11:00 committed by Randy Mackay
parent 0e52bafa53
commit 771fe173d4
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ private:
uavcan::Node<0> *_node;
uint8_t _driver_index;
char _thread_name[9];
char _thread_name[13];
bool _initialized;
///// SRV output /////
struct {

View File

@ -547,7 +547,7 @@ void trampoline_handleNodeInfo(const uavcan::ServiceCallResult<uavcan::protocol:
uavcan::copy(resp.getResponse().hardware_version.unique_id.begin(),
resp.getResponse().hardware_version.unique_id.end(),
unique_id);
snprintf(name, ARRAY_SIZE(name), "%s", resp.getResponse().name.c_str());
strncpy(name, resp.getResponse().name.c_str(), sizeof(name)-1);
AP::uavcan_dna_server().handleNodeInfo(node_id, unique_id, name);
}