Skip to content

Commit

Permalink
gen_init_cpio: add static const qualifiers
Browse files Browse the repository at this point in the history
Add 'const' to constant arrays. I also added missing 'static'.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
  • Loading branch information
masahir0y committed Oct 13, 2021
1 parent 88f5e1e commit 3510c5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/gen_init_cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct generic_type {
mode_t mode;
};

static struct generic_type generic_type_table[] = {
static const struct generic_type generic_type_table[] = {
[GT_DIR] = {
.type = "dir",
.mode = S_IFDIR
Expand Down Expand Up @@ -491,7 +491,7 @@ static void usage(const char *prog)
prog);
}

struct file_handler file_handler_table[] = {
static const struct file_handler file_handler_table[] = {
{
.type = "file",
.handler = cpio_mkfile_line,
Expand Down

0 comments on commit 3510c5c

Please sign in to comment.