From 0ad74489aee8717d13b76a3cdf2ee00f5811bf9b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 25 Jul 2019 22:01:47 +0200 Subject: cleanup: remove some redundant header inclusions The utility programs pretty much all have the same structure of including one central header per C file that includes all required library headers, so we can simply include config.h which we need for large file support from there and remove it from the C files. Signed-off-by: David Oberhollenzer --- unpack/describe.c | 4 ---- unpack/list_files.c | 4 ---- unpack/options.c | 2 -- unpack/rdsquashfs.c | 2 -- unpack/rdsquashfs.h | 1 + unpack/restore_fstree.c | 2 -- 6 files changed, 1 insertion(+), 14 deletions(-) (limited to 'unpack') diff --git a/unpack/describe.c b/unpack/describe.c index cf5befd..be27857 100644 --- a/unpack/describe.c +++ b/unpack/describe.c @@ -1,10 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" - #include "rdsquashfs.h" -#include - static void print_name(tree_node_t *n) { if (n->parent != NULL) { diff --git a/unpack/list_files.c b/unpack/list_files.c index 4038684..9c48d46 100644 --- a/unpack/list_files.c +++ b/unpack/list_files.c @@ -1,10 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" - #include "rdsquashfs.h" -#include - static void mode_to_str(uint16_t mode, char *p) { switch (mode & S_IFMT) { diff --git a/unpack/options.c b/unpack/options.c index 0f0660e..c42f16a 100644 --- a/unpack/options.c +++ b/unpack/options.c @@ -1,6 +1,4 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" - #include "rdsquashfs.h" static struct option long_opts[] = { diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c index 2996668..4a0f12b 100644 --- a/unpack/rdsquashfs.c +++ b/unpack/rdsquashfs.c @@ -1,6 +1,4 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" - #include "rdsquashfs.h" int main(int argc, char **argv) diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h index aa051a2..ed882ff 100644 --- a/unpack/rdsquashfs.h +++ b/unpack/rdsquashfs.h @@ -13,6 +13,7 @@ #include "fstree.h" #include "util.h" +#include #include #include #include diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c index 8fb04d7..455e604 100644 --- a/unpack/restore_fstree.c +++ b/unpack/restore_fstree.c @@ -1,6 +1,4 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" - #include "rdsquashfs.h" static int create_node(tree_node_t *n, data_reader_t *data, int flags) -- cgit v1.2.3