Browse Source

[net][sal] fix sockfd initialize error problem

Signed-off-by: chenyong <1521761801@qq.com>
chenyong 6 years ago
parent
commit
6f732ebb7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/net/sal_socket/src/sal_socket.c

+ 1 - 1
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;