Browse Source

Assert on correct parameters (#1505)

This also fixes debug build
Marcin Kolny 3 năm trước cách đây
mục cha
commit
c072b5172c
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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
 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;
     socklen_t linger_opts_len = sizeof(linger_opts);