Xinqi Bao's Git

Clean up header includes
authorAaron Marcher <[email protected]>
Wed, 30 May 2018 17:35:37 +0000 (19:35 +0200)
committerAaron Marcher <[email protected]>
Wed, 30 May 2018 17:35:37 +0000 (19:35 +0200)
 - Remove <errno.h> because related functions are in util.c now
 - Remove corresponding <string.h> if not used otherwise

14 files changed:
components/battery.c
components/cpu.c
components/disk.c
components/hostname.c
components/ip.c
components/kernel_release.c
components/num_files.c
components/run_command.c
components/swap.c
components/temperature.c
components/uptime.c
components/user.c
components/volume.c
components/wifi.c

index 8bfe42a..99e09d5 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
index ecd45a6..cd5ebe4 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
index f3c96d5..9d2284e 100644 (file)
@@ -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"
index dc3bbf1..23da677 100644 (file)
@@ -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"
index 468dc84..f26e49a 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <ifaddrs.h>
 #include <netdb.h>
 #include <stdio.h>
index 531014c..0457301 100644 (file)
@@ -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"
 
index 9179037..86ea064 100644 (file)
@@ -1,6 +1,5 @@
 /* See LICENSE file for copyright and license details. */
 #include <dirent.h>
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
index 7ae1b69..e00b478 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
index 9bd599a..b3b519e 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
index bbec80b..fe2e0c9 100644 (file)
@@ -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>
index f97809d..8f15d71 100644 (file)
@@ -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>
 
index cd503f6..71a0c9d 100644 (file)
@@ -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>
 
index 8674211..8a70b20 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
index b3e1723..7815c86 100644 (file)
@@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <ifaddrs.h>
 #include <stdio.h>
 #include <string.h>