commit b0401b13bb78bacde9d10b00766830cbeb2c90f6
parent c0436810efa61b1207f57838fbb79b31bf593433
Author: Aaron Marcher <me@drkhsh.at>
Date: Wed, 30 May 2018 19:35:37 +0200
Clean up header includes
- Remove <errno.h> because related functions are in util.c now
- Remove corresponding <string.h> if not used otherwise
Diffstat:
14 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/components/battery.c b/components/battery.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/components/cpu.c b/components/cpu.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/components/disk.c b/components/disk.c
@@ -1,7 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
-#include <string.h>
#include <sys/statvfs.h>
#include "../util.h"
diff --git a/components/hostname.c b/components/hostname.c
@@ -1,7 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
-#include <string.h>
#include <unistd.h>
#include "../util.h"
diff --git a/components/ip.c b/components/ip.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <stdio.h>
diff --git a/components/kernel_release.c b/components/kernel_release.c
@@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <sys/utsname.h>
#include <stdio.h>
-#include <string.h>
#include "../util.h"
diff --git a/components/num_files.c b/components/num_files.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <dirent.h>
-#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/components/run_command.c b/components/run_command.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/components/swap.c b/components/swap.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/components/temperature.c b/components/temperature.c
@@ -16,9 +16,7 @@
return bprintf("%d", temp / 1000);
}
#elif defined(__OpenBSD__)
- #include <errno.h>
#include <stdio.h>
- #include <string.h>
#include <sys/time.h> /* before <sys/sensors.h> for struct timeval */
#include <sys/sensors.h>
#include <sys/sysctl.h>
diff --git a/components/uptime.c b/components/uptime.c
@@ -29,8 +29,6 @@ format(int uptime)
return format(uptime);
}
#elif defined(__OpenBSD__)
- #include <errno.h>
- #include <string.h>
#include <sys/sysctl.h>
#include <sys/time.h>
diff --git a/components/user.c b/components/user.c
@@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <pwd.h>
#include <stdio.h>
-#include <string.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/components/volume.c b/components/volume.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
diff --git a/components/wifi.c b/components/wifi.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <string.h>