ftdipp_mpsse: fix format-zero-length snprintf -> memset
This commit is contained in:
parent
0e1e07262c
commit
6ef87c5466
|
|
@ -158,7 +158,7 @@ void FTDIpp_MPSSE::open_device(const std::string &serial, unsigned int baudrate)
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
char description[256];
|
char description[256];
|
||||||
if (_bus == 0 || _addr == 0)
|
if (_bus == 0 || _addr == 0)
|
||||||
snprintf(description, sizeof(description), "");
|
memset(description, '\0', 256);
|
||||||
else
|
else
|
||||||
#if (FTDI_VERSION < 104)
|
#if (FTDI_VERSION < 104)
|
||||||
snprintf(description, sizeof(description), "");
|
snprintf(description, sizeof(description), "");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue