Initialized data with calloc instead of malloc

This commit is contained in:
Ugo Cirmignani
2018-12-01 17:12:28 +01:00
parent c64d8249db
commit 617886f40d
4 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -698,4 +698,4 @@ int isCharInString(char *theString, int stringLen, char theChar)
}
return -1;
}
}

View File

@ -122,7 +122,7 @@ void initFtpData(ftpDataType *ftpData)
srand(time(NULL));
ftpData->connectedClients = 0;
ftpData->clients = (clientDataType *) malloc( sizeof(clientDataType) * ftpData->ftpParameters.maxClients);
ftpData->clients = (clientDataType *) calloc( sizeof(clientDataType), ftpData->ftpParameters.maxClients);
ftpData->serverIp.ip[0] = 127;
ftpData->serverIp.ip[1] = 0;