فهرست منبع

Assert on correct parameters (#1505)

This also fixes debug build
Marcin Kolny 3 سال پیش
والد
کامیت
c072b5172c
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      core/shared/platform/common/posix/posix_socket.c

+ 2 - 1
core/shared/platform/common/posix/posix_socket.c

@@ -551,7 +551,8 @@ os_socket_set_linger(bh_socket_t socket, bool is_enabled, int linger_s)
 int
 int
 os_socket_get_linger(bh_socket_t socket, bool *is_enabled, int *linger_s)
 os_socket_get_linger(bh_socket_t socket, bool *is_enabled, int *linger_s)
 {
 {
-    assert(time_s);
+    assert(is_enabled);
+    assert(linger_s);
 
 
     struct linger linger_opts;
     struct linger linger_opts;
     socklen_t linger_opts_len = sizeof(linger_opts);
     socklen_t linger_opts_len = sizeof(linger_opts);