Merge pull request #82 from DavidLin1577/patch-1

Update HAL_TCP_module.c
This commit is contained in:
Arthur 2020-01-20 11:59:47 +08:00 committed by GitHub
commit abe0230572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -43,9 +43,8 @@ static uint32_t _time_left(uint32_t t_end, uint32_t t_now)
uintptr_t HAL_TCP_Connect(const char *host, uint16_t port)
{
int fd;
char port_str[PORT_BUFF_LEN];
memset(port_str, 0, PORT_BUFF_LEN);
char port_str[PORT_BUFF_LEN] = {0};
snprintf(port_str, PORT_BUFF_LEN, "%u", port);
Log_i("osal_tcp_connect entry, host=%s port=%d(%s)", host , port, port_str);