@@ -65,7 +65,7 @@ int idrnet_getaddrinfo(struct addrinfo** address_res, char* host, int port,
6565int idrnet_bind(int sockfd, int family, int socket_type, char* host, int port) {
6666 struct addrinfo* address_res;
6767 int addr_res = idrnet_getaddrinfo(&address_res, host, port, family, socket_type);
68− if (addr_res == -1) {
68+ if (addr_res != 0) {
6969 //printf("Lib err: bind getaddrinfo\n");
7070 return -1;
7171 }
@@ -189,7 +189,7 @@ int idrnet_sendto(int sockfd, char* data, char* host, int port, int family) {
189189
190190 struct addrinfo* remote_host;
191191 int addr_res = idrnet_getaddrinfo(&remote_host, host, port, family, SOCK_DGRAM);
192− if (addr_res == -1) {
192+ if (addr_res != 0) {
193193 return -1;
194194 }
195195
@@ -203,7 +203,7 @@ int idrnet_sendto_buf(int sockfd, void* buf, int buf_len, char* host, int port,
203203
204204 struct addrinfo* remote_host;
205205 int addr_res = idrnet_getaddrinfo(&remote_host, host, port, family, SOCK_DGRAM);
206− if (addr_res == -1) {
206+ if (addr_res != 0) {
207207 //printf("lib err: sendto getaddrinfo \n");
208208 return -1;
209209 }