diff options
| author | chenyong <[email protected]> | 2019-04-24 00:11:04 +0800 |
|---|---|---|
| committer | chenyong <[email protected]> | 2019-04-24 00:11:04 +0800 |
| commit | 6f732ebb7f656b3d9d5b7b6bd1cb8b2ab6d6e295 (patch) | |
| tree | 68430cca053fa5b9fee0af397fbb8b70d651c85b /components/net/sal_socket/src | |
| parent | 126fa9b561e9313a70cad58ea2fbb278aa2fe65e (diff) | |
[net][sal] fix sockfd initialize error problem
Signed-off-by: chenyong <[email protected]>
Diffstat (limited to 'components/net/sal_socket/src')
| -rw-r--r-- | components/net/sal_socket/src/sal_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 581761103a..f4d5549aad 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -139,7 +139,7 @@ static void check_netdev_internet_up_work(struct rt_work *work, void *work_data) #define SAL_INTERNET_MONTH_LEN 4 #define SAL_INTERNET_DATE_LEN 16 - int index, sockfd = 0, result = 0; + int index, sockfd = -1, result = 0; struct sockaddr_in server_addr; struct hostent *host; struct timeval timeout; |
