From 795ffc5e62e8ba383575dbcd9943a580d4bd3358 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 15:50:21 +0200 Subject: formatting changes Manual format adjustments. Comment adjustments. Remove usage of the register keyword. --- src/socket_udp.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/socket_udp.c') diff --git a/src/socket_udp.c b/src/socket_udp.c index 2ac6068..59af450 100644 --- a/src/socket_udp.c +++ b/src/socket_udp.c @@ -15,17 +15,15 @@ #endif /** - @file socket_udp.c - @author djb, fefe, feh - @source ucspi-tcp6 - @brief setup a UDP message socket + @file socket_udp.c + @author djb, fefe, feh + @source ucspi-tcp6 + @brief setup a UDP message socket */ int socket_udp6(void) { - int s; - - s = socket(AF_INET6, SOCK_DGRAM, 0); + int s = socket(AF_INET6, SOCK_DGRAM, 0); if (s != -1) if (ndelay_on(s) == -1) { close(s); @@ -37,9 +35,7 @@ int socket_udp6(void) int socket_udp4(void) { - int s; - - s = socket(AF_INET, SOCK_DGRAM, 0); + int s = socket(AF_INET, SOCK_DGRAM, 0); if (s != -1) if (ndelay_on(s) == -1) { close(s); @@ -51,9 +47,7 @@ int socket_udp4(void) int socket_udp(void) { - int s; - - s = socket(AF_INET6, SOCK_DGRAM, 0); + int s = socket(AF_INET6, SOCK_DGRAM, 0); if (s == -1) if (errno == EINVAL || errno == EAFNOSUPPORT || errno == EPROTO || errno == EPROTONOSUPPORT) s = socket(AF_INET, SOCK_DGRAM, 0); -- cgit v1.2.3