close(fd) instead of (void) close(fd)
This commit is contained in:
parent
98386514e5
commit
6c4af9020f
|
@ -305,7 +305,7 @@ int owl_create_udp_listening_socket(uint_fast16_t port)
|
|||
if (ret < 0)
|
||||
{
|
||||
perror("Cannot bind the UDP socket") ;
|
||||
(void) close(sockfd) ;
|
||||
close(sockfd) ;
|
||||
return ret ;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* Last cleaning tasks */
|
||||
exit:
|
||||
(void) close(sockfd) ; // Close socket
|
||||
close(sockfd) ; // Close socket
|
||||
free_request_list() ;
|
||||
free_ap_list() ;
|
||||
cfg_free(cfg) ; // Clean configuration
|
||||
|
@ -653,7 +653,7 @@ void* monitor_requests(void *NULL_value)
|
|||
/* Close output file & socket */
|
||||
if (fclose(fd) != 0)
|
||||
perror("Error closing output file") ;
|
||||
(void) close(sockfd) ;
|
||||
close(sockfd) ;
|
||||
|
||||
pthread_exit(NULL_value) ;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ void* listen_for_aps(void *NULL_value)
|
|||
update_ap(message.ap_mac_addr_bytes, ap_ip_addr) ;
|
||||
}
|
||||
|
||||
(void) close(listen_sockfd) ;
|
||||
close(listen_sockfd) ;
|
||||
|
||||
pthread_exit(NULL_value) ;
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ void order_send(ap_list *ap)
|
|||
exit(ERR_SENDING_INFO) ;
|
||||
}
|
||||
|
||||
(void) close(sockfd) ;
|
||||
close(sockfd) ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
|
|||
make_packet() ;
|
||||
send_request() ;
|
||||
|
||||
(void) close(sockfd) ;
|
||||
close(sockfd) ;
|
||||
|
||||
if (options.listening_port > 0)
|
||||
receive_position() ;
|
||||
|
@ -367,7 +367,7 @@ void receive_position()
|
|||
recvfrom(sockfd, &x, sizeof(float), 0, NULL, NULL) ;
|
||||
recvfrom(sockfd, &y, sizeof(float), 0, NULL, NULL) ;
|
||||
recvfrom(sockfd, &z, sizeof(float), 0, NULL, NULL) ;
|
||||
(void) close(sockfd) ;
|
||||
close(sockfd) ;
|
||||
|
||||
printf("Computed position: (%.4f;%.4f;%.4f)\n", x, y, z) ;
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ int capture()
|
|||
pcap_loop(handle, 1, read_packet, NULL) ;
|
||||
|
||||
pcap_close(handle) ; // Stop capture
|
||||
(void) close(aggregation_sockfd) ; // Close socket
|
||||
close(aggregation_sockfd) ; // Close socket
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
@ -1053,7 +1053,7 @@ void* autocalibrate_hello(void *NULL_value)
|
|||
sleep(GET_AUTOCALIBRATION_HELLO_DELAY()) ;
|
||||
}
|
||||
|
||||
(void) close(send_sockfd) ;
|
||||
close(send_sockfd) ;
|
||||
|
||||
pthread_exit(NULL_value) ;
|
||||
}
|
||||
|
@ -1112,7 +1112,7 @@ void* autocalibrate(void *NULL_value)
|
|||
"Autocalibration order unknown: %d.\n", message.order) ;
|
||||
}
|
||||
|
||||
(void) close(listen_sockfd) ;
|
||||
close(listen_sockfd) ;
|
||||
|
||||
pthread_exit(NULL_value) ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue