Skip to content

Commit 3510c5c

Browse files
committed
gen_init_cpio: add static const qualifiers
Add 'const' to constant arrays. I also added missing 'static'. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent 88f5e1e commit 3510c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usr/gen_init_cpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ struct generic_type {
188188
mode_t mode;
189189
};
190190

191-
static struct generic_type generic_type_table[] = {
191+
static const struct generic_type generic_type_table[] = {
192192
[GT_DIR] = {
193193
.type = "dir",
194194
.mode = S_IFDIR
@@ -491,7 +491,7 @@ static void usage(const char *prog)
491491
prog);
492492
}
493493

494-
struct file_handler file_handler_table[] = {
494+
static const struct file_handler file_handler_table[] = {
495495
{
496496
.type = "file",
497497
.handler = cpio_mkfile_line,

0 commit comments

Comments
 (0)