]> granicus.if.org Git - libevent/commit
test/et/et: use evutil_socket_t* over int* for pointer to the pair
authorAzat Khuzhin <azat@libevent.org>
Tue, 29 Jan 2019 18:06:37 +0000 (21:06 +0300)
committerAzat Khuzhin <azat@libevent.org>
Tue, 29 Jan 2019 18:11:27 +0000 (21:11 +0300)
commit0791a17204ff70bbea92520352a0c6e8d185fa4b
treeaa8c85302180ec0373fb8d1bef4c85af11cc7ccc
parente2e82241d182807b154dad5c546d9ef4581eb489
test/et/et: use evutil_socket_t* over int* for pointer to the pair

Next code will not work correctly under win x64:
  evutil_socket_t very_long_pair_name[2];
  int *pair = very_long_pair_name; // <-- accessing the second word of the first element

Because sizeof(evutil_socket_t) == sizeof(intptr_t) == 8

P.S. in the 5334762f another test had been fixed instead of the one that
really fails.

Fixes: 5334762f ("test/et/et: fix it by using appropriate type for the SOCKET (evutil_socket_t)")
Refs: #750
test/regress_et.c