From befa5866ee30d09c0c96e88af2eabff5911342ea Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 3 Jul 2016 14:40:11 -0400 Subject: make brace placement in public header struct definitions consistent placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives. --- include/netinet/in.h | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'include/netinet/in.h') diff --git a/include/netinet/in.h b/include/netinet/in.h index 04cc81cd..f6bb77b1 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -13,16 +13,14 @@ typedef uint16_t in_port_t; typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; -struct sockaddr_in -{ +struct sockaddr_in { sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; uint8_t sin_zero[8]; }; -struct in6_addr -{ +struct in6_addr { union { uint8_t __s6_addr[16]; uint16_t __s6_addr16[8]; @@ -33,8 +31,7 @@ struct in6_addr #define s6_addr16 __in6_union.__s6_addr16 #define s6_addr32 __in6_union.__s6_addr32 -struct sockaddr_in6 -{ +struct sockaddr_in6 { sa_family_t sin6_family; in_port_t sin6_port; uint32_t sin6_flowinfo; @@ -42,8 +39,7 @@ struct sockaddr_in6 uint32_t sin6_scope_id; }; -struct ipv6_mreq -{ +struct ipv6_mreq { struct in6_addr ipv6mr_multiaddr; unsigned ipv6mr_interface; }; @@ -228,8 +224,7 @@ uint16_t ntohs(uint16_t); #define IP_DEFAULT_MULTICAST_LOOP 1 #define IP_MAX_MEMBERSHIPS 20 -struct ip_opts -{ +struct ip_opts { struct in_addr ip_dst; char ip_opts[40]; }; @@ -247,14 +242,12 @@ struct ip_opts #define MCAST_EXCLUDE 0 #define MCAST_INCLUDE 1 -struct ip_mreq -{ +struct ip_mreq { struct in_addr imr_multiaddr; struct in_addr imr_interface; }; -struct ip_mreqn -{ +struct ip_mreqn { struct in_addr imr_multiaddr; struct in_addr imr_address; int imr_ifindex; @@ -299,21 +292,18 @@ struct group_filter { (sizeof(struct group_filter) - sizeof(struct sockaddr_storage) \ + (numsrc) * sizeof(struct sockaddr_storage)) -struct in_pktinfo -{ +struct in_pktinfo { int ipi_ifindex; struct in_addr ipi_spec_dst; struct in_addr ipi_addr; }; -struct in6_pktinfo -{ +struct in6_pktinfo { struct in6_addr ipi6_addr; unsigned ipi6_ifindex; }; -struct ip6_mtuinfo -{ +struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; uint32_t ip6m_mtu; }; -- cgit v1.2.1