summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-04 13:41:37 +0100
committerGitHub <noreply@github.com>2019-11-04 13:41:37 +0100
commita859abf062cef1511e4879c4ee39c6036ebeaec8 (patch)
treefca2f528a1cc0293ba28e478be7e87cecbdf354d /src/shared
parentf9f1d01cbd19d5396656e8a4caaaa4ab59d464fc (diff)
parent146ca45902d7089c79bdf252d1590a1f15238162 (diff)
downloadsystemd-a859abf062cef1511e4879c4ee39c6036ebeaec8.tar.gz
Merge pull request #13906 from yuwata/drop-missing-take2
tree-wide: drop xxx.h when xxx-util.h is included
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ask-password-api.c3
-rw-r--r--src/shared/bus-util.c2
-rw-r--r--src/shared/calendarspec.c3
-rw-r--r--src/shared/cgroup-setup.c1
-rw-r--r--src/shared/cgroup-show.c1
-rw-r--r--src/shared/clean-ipc.c2
-rw-r--r--src/shared/condition.c2
-rw-r--r--src/shared/conf-parser.c1
-rw-r--r--src/shared/dm-util.c1
-rw-r--r--src/shared/dns-domain.c1
-rw-r--r--src/shared/efi-loader.c1
-rw-r--r--src/shared/ethtool-util.c1
-rw-r--r--src/shared/ethtool-util.h1
-rw-r--r--src/shared/fdset.c1
-rw-r--r--src/shared/firewall-util.c2
-rw-r--r--src/shared/fstab-util.c2
-rw-r--r--src/shared/import-util.c1
-rw-r--r--src/shared/install-printf.c1
-rw-r--r--src/shared/install.c3
-rw-r--r--src/shared/json.c1
-rw-r--r--src/shared/logs-show.c2
-rw-r--r--src/shared/loop-util.c1
-rw-r--r--src/shared/machine-image.c2
-rw-r--r--src/shared/machine-pool.c1
-rw-r--r--src/shared/mount-util.c1
-rw-r--r--src/shared/pager.c2
-rw-r--r--src/shared/path-lookup.c1
-rw-r--r--src/shared/serialize.c1
-rw-r--r--src/shared/sleep-config.c2
-rw-r--r--src/shared/specifier.c1
-rw-r--r--src/shared/switch-root.c1
-rw-r--r--src/shared/sysctl-util.c1
-rw-r--r--src/shared/utmp-wtmp.c1
-rw-r--r--src/shared/verbs.c1
-rw-r--r--src/shared/xml.c1
35 files changed, 0 insertions, 50 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index 9b5b8f8f13..5488d8a74b 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -5,16 +5,13 @@
#include <inttypes.h>
#include <limits.h>
#include <poll.h>
-#include <signal.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/inotify.h>
#include <sys/signalfd.h>
-#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/uio.h>
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 7a4da51911..5fbc55770e 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -3,9 +3,7 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/socket.h>
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
index 9b1582da99..aa0d6a8224 100644
--- a/src/shared/calendarspec.c
+++ b/src/shared/calendarspec.c
@@ -1,15 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <alloca.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/mman.h>
-#include <time.h>
#include "alloc-util.h"
#include "calendarspec.h"
diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
index ddcd156801..e8398cbde5 100644
--- a/src/shared/cgroup-setup.c
+++ b/src/shared/cgroup-setup.c
@@ -149,7 +149,6 @@ int cg_blkio_weight_parse(const char *s, uint64_t *ret) {
return 0;
}
-
static int trim_cb(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
assert(path);
assert(sb);
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index 732bc752af..4657e820d9 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -5,7 +5,6 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "alloc-util.h"
#include "bus-error.h"
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c
index 46fa68027e..e4cd2d30d0 100644
--- a/src/shared/clean-ipc.c
+++ b/src/shared/clean-ipc.c
@@ -1,13 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <mqueue.h>
#include <stdbool.h>
#include <stdio.h>
-#include <string.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/sem.h>
diff --git a/src/shared/condition.c b/src/shared/condition.c
index 5a5d35bcc3..9f4c7fe338 100644
--- a/src/shared/condition.c
+++ b/src/shared/condition.c
@@ -5,8 +5,6 @@
#include <fnmatch.h>
#include <limits.h>
#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <time.h>
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index ce714bcc8b..3269d83031 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -5,7 +5,6 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include "alloc-util.h"
diff --git a/src/shared/dm-util.c b/src/shared/dm-util.c
index f73bf93520..d817e5b0e5 100644
--- a/src/shared/dm-util.c
+++ b/src/shared/dm-util.c
@@ -1,6 +1,5 @@
#include <fcntl.h>
#include <linux/dm-ioctl.h>
-#include <string.h>
#include <sys/ioctl.h>
#include "dm-util.h"
diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
index f62ad0a0f5..b812665315 100644
--- a/src/shared/dns-domain.c
+++ b/src/shared/dns-domain.c
@@ -10,7 +10,6 @@
#include <endian.h>
#include <netinet/in.h>
#include <stdio.h>
-#include <string.h>
#include <sys/socket.h>
#include "alloc-util.h"
diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c
index 46e187000f..3d1df09907 100644
--- a/src/shared/efi-loader.c
+++ b/src/shared/efi-loader.c
@@ -181,7 +181,6 @@ int efi_set_reboot_to_firmware(bool value) {
return 0;
}
-
static ssize_t utf16_size(const uint16_t *s, size_t buf_len_bytes) {
size_t l = 0;
diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
index e29b81f132..8fec1a83f0 100644
--- a/src/shared/ethtool-util.c
+++ b/src/shared/ethtool-util.c
@@ -411,7 +411,6 @@ int ethtool_set_nic_buffer_size(int *fd, const char *ifname, netdev_ring_param *
return 0;
}
-
static int get_stringset(int fd, struct ifreq *ifr, int stringset_id, struct ethtool_gstrings **gstrings) {
_cleanup_free_ struct ethtool_gstrings *strings = NULL;
struct {
diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
index 5dd7800852..d408bcd90a 100644
--- a/src/shared/ethtool-util.h
+++ b/src/shared/ethtool-util.h
@@ -87,7 +87,6 @@ typedef struct netdev_ring_param {
bool tx_pending_set;
} netdev_ring_param;
-
int ethtool_get_driver(int *fd, const char *ifname, char **ret);
int ethtool_get_link_info(int *fd, const char *ifname,
int *ret_autonegotiation, size_t *ret_speed,
diff --git a/src/shared/fdset.c b/src/shared/fdset.c
index ae65286c78..89d118a3aa 100644
--- a/src/shared/fdset.c
+++ b/src/shared/fdset.c
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c
index 93bdd8c7f1..4d4d615bb7 100644
--- a/src/shared/firewall-util.c
+++ b/src/shared/firewall-util.c
@@ -5,13 +5,11 @@
*/
#define _NET_IF_H 1
-#include <alloca.h>
#include <arpa/inet.h>
#include <endian.h>
#include <errno.h>
#include <stddef.h>
#include <string.h>
-#include <sys/socket.h>
#include <net/if.h>
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index 135b01f282..75e4784c38 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -1,10 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <mntent.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "alloc-util.h"
#include "device-nodes.h"
diff --git a/src/shared/import-util.c b/src/shared/import-util.c
index dad6c1c2fe..f7770e7df5 100644
--- a/src/shared/import-util.c
+++ b/src/shared/import-util.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <string.h>
#include "alloc-util.h"
#include "btrfs-util.h"
diff --git a/src/shared/install-printf.c b/src/shared/install-printf.c
index d2143beda3..2061384afe 100644
--- a/src/shared/install-printf.c
+++ b/src/shared/install-printf.c
@@ -2,7 +2,6 @@
#include <errno.h>
#include <stdio.h>
-#include <string.h>
#include <unistd.h>
#include "format-util.h"
diff --git a/src/shared/install.c b/src/shared/install.c
index 17f6f99f29..14dfd331d5 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
@@ -8,8 +7,6 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
#include <unistd.h>
#include "alloc-util.h"
diff --git a/src/shared/json.c b/src/shared/json.c
index f1bb50cfa2..7393c100cd 100644
--- a/src/shared/json.c
+++ b/src/shared/json.c
@@ -5,7 +5,6 @@
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include "sd-messages.h"
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index b615c70dff..95b2e3376e 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -5,10 +5,8 @@
#include <signal.h>
#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <syslog.h>
-#include <time.h>
#include <unistd.h>
#include "sd-id128.h"
diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c
index 22525d5c63..559d7f8174 100644
--- a/src/shared/loop-util.c
+++ b/src/shared/loop-util.c
@@ -4,7 +4,6 @@
#include <fcntl.h>
#include <linux/loop.h>
#include <sys/ioctl.h>
-#include <sys/stat.h>
#include "alloc-util.h"
#include "fd-util.h"
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
index cceed58f74..a11803e731 100644
--- a/src/shared/machine-image.c
+++ b/src/shared/machine-image.c
@@ -1,11 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
diff --git a/src/shared/machine-pool.c b/src/shared/machine-pool.c
index 98f5413133..7e3312835d 100644
--- a/src/shared/machine-pool.c
+++ b/src/shared/machine-pool.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <sys/statfs.h>
#include "btrfs-util.h"
#include "label.h"
diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c
index e55d3c2315..d316e81aa2 100644
--- a/src/shared/mount-util.c
+++ b/src/shared/mount-util.c
@@ -2,7 +2,6 @@
#include <errno.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
diff --git a/src/shared/pager.c b/src/shared/pager.c
index 7c20b100b4..1fe9db1791 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <signal.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/prctl.h>
#include <unistd.h>
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index 6bf0ff0316..5b16209745 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -3,7 +3,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "alloc-util.h"
#include "fs-util.h"
diff --git a/src/shared/serialize.c b/src/shared/serialize.c
index 5b5e4947ef..00b70a777e 100644
--- a/src/shared/serialize.c
+++ b/src/shared/serialize.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
-#include <sys/mman.h>
#include "alloc-util.h"
#include "env-util.h"
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index e8f61b36e9..03108b92cb 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -8,8 +8,6 @@
#include <linux/fs.h>
#include <stdbool.h>
#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/src/shared/specifier.c b/src/shared/specifier.c
index c8e789680d..b036ff67dd 100644
--- a/src/shared/specifier.c
+++ b/src/shared/specifier.c
@@ -4,7 +4,6 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/utsname.h>
#include "sd-id128.h"
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
index ebe9041482..bd89cb4ef1 100644
--- a/src/shared/switch-root.c
+++ b/src/shared/switch-root.c
@@ -4,7 +4,6 @@
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
-#include <stdio.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
index 93bdcf11bf..12fb3ef7ea 100644
--- a/src/shared/sysctl-util.c
+++ b/src/shared/sysctl-util.c
@@ -3,7 +3,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <string.h>
#include <unistd.h>
#include "fd-util.h"
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
index 646f449821..fa4f32f353 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
@@ -6,7 +6,6 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <unistd.h>
diff --git a/src/shared/verbs.c b/src/shared/verbs.c
index c87b496736..1d23ed48a2 100644
--- a/src/shared/verbs.c
+++ b/src/shared/verbs.c
@@ -4,7 +4,6 @@
#include <getopt.h>
#include <stdbool.h>
#include <stddef.h>
-#include <string.h>
#include "env-util.h"
#include "log.h"
diff --git a/src/shared/xml.c b/src/shared/xml.c
index 2709076264..78ac42f080 100644
--- a/src/shared/xml.c
+++ b/src/shared/xml.c
@@ -2,7 +2,6 @@
#include <errno.h>
#include <stddef.h>
-#include <string.h>
#include "macro.h"
#include "string-util.h"