tree-wide: Sort includes

This was done by running a locally built clang-format with
https://github.com/llvm/llvm-project/pull/137617 and
https://github.com/llvm/llvm-project/pull/137840 applied on all .c
and .h files.
This commit is contained in:
Daan De Meyer
2025-04-30 09:30:51 +02:00
parent b773143708
commit 1cf40697e3
445 changed files with 596 additions and 668 deletions
+1 -2
View File
@@ -3,13 +3,12 @@
Copyright © 2013 Intel Corporation. All rights reserved.
***/
/* Make sure the net/if.h header is included before any linux/ one */
#include <net/if.h>
#include <errno.h>
#include <linux/filter.h>
#include <linux/if_infiniband.h>
#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <stdio.h>
#include <string.h>
+1 -1
View File
@@ -4,9 +4,9 @@
#include <stdint.h>
#include "sd-dhcp-option.h"
#include "dns-resolver-internal.h"
#include "dhcp-protocol.h"
#include "dns-resolver-internal.h"
#include "hash-funcs.h"
struct sd_dhcp_option {
+1 -1
View File
@@ -8,8 +8,8 @@
#include <net/ethernet.h>
#include <netinet/in.h>
#include "sd-event.h"
#include "sd-dhcp6-client.h"
#include "sd-event.h"
#include "dhcp-duid-internal.h"
#include "dhcp6-client-internal.h"
@@ -8,10 +8,10 @@
#include <inttypes.h>
#include "sd-dhcp6-lease.h"
#include "dns-resolver-internal.h"
#include "dhcp6-option.h"
#include "dhcp6-protocol.h"
#include "dns-resolver-internal.h"
#include "macro.h"
#include "set.h"
#include "time-util.h"
+1 -1
View File
@@ -4,13 +4,13 @@
***/
#include <errno.h>
#include <linux/if_packet.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/if_packet.h>
#include "dhcp6-internal.h"
#include "dhcp6-protocol.h"
@@ -5,8 +5,8 @@
#include "sd-dns-resolver.h"
#include "macro.h"
#include "list.h"
#include "macro.h"
#include "socket-netlink.h"
/* https://www.iana.org/assignments/dns-svcb/dns-svcb.xhtml#dns-svcparamkeys */
+1 -2
View File
@@ -4,14 +4,13 @@
#include <sys/socket.h>
#include <unistd.h>
#include "sd-dhcp-client.c"
#include "alloc-util.h"
#include "dhcp-lease-internal.h"
#include "dhcp-network.h"
#include "fs-util.h"
#include "fuzz.h"
#include "network-internal.h"
#include "sd-dhcp-client.c"
#include "tmpfile-util.h"
int dhcp_network_bind_raw_socket(
@@ -4,9 +4,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "sd-dhcp-server.c"
#include "fuzz.h"
#include "sd-dhcp-server.c"
ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {
return len;
+1 -2
View File
@@ -4,11 +4,10 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "sd-dhcp-server.c"
#include "fuzz.h"
#include "path-util.h"
#include "rm-rf.h"
#include "sd-dhcp-server.c"
#include "tmpfile-util.h"
/* stub out network so that the server doesn't send */
+1 -2
View File
@@ -3,10 +3,9 @@
Copyright © 2014 Intel Corporation. All rights reserved.
***/
/* Make sure the net/if.h header is included before any linux/ one */
#include <net/if.h>
#include <errno.h>
#include <linux/if_packet.h>
#include <net/if.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
+1 -1
View File
@@ -3,8 +3,8 @@
#include <linux/ipv6.h>
#include <netinet/icmp6.h>
#include "dns-resolver-internal.h"
#include "dns-domain.h"
#include "dns-resolver-internal.h"
#include "ether-addr-util.h"
#include "hostname-util.h"
#include "icmp6-util.h"
+1 -1
View File
@@ -8,8 +8,8 @@
#include <netinet/ip6.h>
#include <sys/uio.h>
#include "sd-ndisc-protocol.h"
#include "sd-dns-resolver.h"
#include "sd-ndisc-protocol.h"
#include "icmp6-packet.h"
#include "macro.h"
+1 -1
View File
@@ -3,8 +3,8 @@
#include "alloc-util.h"
#include "dhcp-client-id-internal.h"
#include "iovec-util.h"
#include "log.h"
#include "json-util.h"
#include "log.h"
#include "unaligned.h"
#include "utf8.h"
+1 -1
View File
@@ -4,12 +4,12 @@
***/
#include <errno.h>
#include <linux/if_infiniband.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/if_infiniband.h>
#include "sd-dhcp-client.h"
+1 -1
View File
@@ -11,12 +11,12 @@
#include <unistd.h>
#include "sd-dhcp-lease.h"
#include "dns-resolver-internal.h"
#include "alloc-util.h"
#include "dhcp-lease-internal.h"
#include "dhcp-option.h"
#include "dns-domain.h"
#include "dns-resolver-internal.h"
#include "env-file.h"
#include "fd-util.h"
#include "fileio.h"
@@ -3,8 +3,8 @@
#include "dhcp-server-lease-internal.h"
#include "fd-util.h"
#include "fs-util.h"
#include "json-util.h"
#include "iovec-util.h"
#include "json-util.h"
#include "mkdir.h"
#include "tmpfile-util.h"
+1 -1
View File
@@ -4,9 +4,9 @@
***/
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/if_arp.h>
#include <linux/if_infiniband.h>
#include <sys/ioctl.h>
#include "sd-dhcp6-client.h"
+1 -1
View File
@@ -3,12 +3,12 @@
#include "dns-resolver-internal.h"
#include "log.h"
#include "macro.h"
#include "unaligned.h"
#include "socket-netlink.h"
#include "stdio-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "unaligned.h"
void sd_dns_resolver_done(sd_dns_resolver *res) {
assert(res);
+1 -1
View File
@@ -3,10 +3,10 @@
Copyright © 2017 Intel Corporation. All rights reserved.
***/
#include <arpa/inet.h>
#include <linux/ipv6.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "sd-radv.h"
+1 -2
View File
@@ -1,9 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Make sure the net/if.h header is included before any linux/ one */
#include <net/if.h>
#include <errno.h>
#include <linux/veth.h>
#include <net/if.h>
#include <stdlib.h>
#include <unistd.h>
+1 -2
View File
@@ -1,9 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Make sure the net/if.h header is included before any linux/ one */
#include <net/if.h>
#include <errno.h>
#include <linux/veth.h>
#include <net/if.h>
#include <stdlib.h>
#include <unistd.h>
+1 -1
View File
@@ -3,8 +3,8 @@
Copyright © 2017 Intel Corporation. All rights reserved.
***/
#include <netinet/icmp6.h>
#include <arpa/inet.h>
#include <netinet/icmp6.h>
#include <unistd.h>
#include "sd-radv.h"
+2 -2
View File
@@ -3,8 +3,8 @@
Copyright © 2014 Intel Corporation. All rights reserved.
***/
#include <netinet/icmp6.h>
#include <arpa/inet.h>
#include <netinet/icmp6.h>
#include <unistd.h>
#include "sd-ndisc.h"
@@ -14,9 +14,9 @@
#include "hexdecoct.h"
#include "icmp6-packet.h"
#include "icmp6-test-util.h"
#include "ndisc-internal.h"
#include "socket-util.h"
#include "strv.h"
#include "ndisc-internal.h"
#include "tests.h"
static struct ether_addr mac_addr = {