1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Fix misleading snprintf() arguments.

This commit is contained in:
Uwe Hermann
2015-02-20 18:57:08 +01:00
parent ea17bfca3d
commit 7c1101dc08
2 changed files with 6 additions and 6 deletions

View File

@@ -137,7 +137,7 @@ SP_PRIV enum sp_return get_port_details(struct sp_port *port)
/* If present, add serial to description for better identification. */
if (port->usb_serial && strlen(port->usb_serial)) {
snprintf(description, sizeof(description) - 1,
snprintf(description, sizeof(description),
"%s - %s", port->description, port->usb_serial);
if (port->description)
free(port->description);