Formatting
This commit is contained in:
parent
cadaf66cae
commit
ab05751888
2 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
printf("%u\n", args.port);
|
||||
|
||||
__attribute__((cleanup(cleanup_tcp_socket))) int tcp_socket = create_tcp_socket(args.port);
|
||||
__attribute__((cleanup(cleanup_tcp_socket))) int tcp_socket =
|
||||
create_tcp_socket(args.port);
|
||||
|
||||
struct timespec sleep_time;
|
||||
sleep_time.tv_sec = 0;
|
||||
|
|
|
@ -53,7 +53,9 @@ int create_tcp_socket(unsigned short port) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
int ret = bind(tcp_socket, (const struct sockaddr *)&ipv6_addr, sizeof(struct sockaddr_in6));
|
||||
int ret = bind(tcp_socket,
|
||||
(const struct sockaddr *)&ipv6_addr,
|
||||
sizeof(struct sockaddr_in6));
|
||||
if (ret != 0) {
|
||||
close(tcp_socket);
|
||||
puts("ERROR: Failed to bind socket!");
|
||||
|
|
Loading…
Reference in a new issue