chg: use calloc

This commit is contained in:
iceman1001 2019-01-30 21:16:20 +01:00
commit 99b6087b01
7 changed files with 9 additions and 9 deletions

View file

@ -75,7 +75,7 @@ const struct timeval timeout = {
serial_port uart_open(const char* pcPortName)
{
serial_port_unix* sp = malloc(sizeof(serial_port_unix));
serial_port_unix* sp = calloc(sizeof(serial_port_unix), sizeof(uint8_t));
if (sp == 0) return INVALID_SERIAL_PORT;
if (memcmp(pcPortName, "tcp:", 4) == 0) {