From c987b0ca80865a8202fec52f41a8d72fc923fc2a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 9 Nov 2010 22:36:01 +0100 Subject: src: declare non-modified data as const Signed-off-by: Jan Engelhardt --- src/expect/getter.c | 2 +- src/expect/setter.c | 2 +- src/expect/snprintf_default.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/expect') diff --git a/src/expect/getter.c b/src/expect/getter.c index f2022d9..9cb6ede 100644 --- a/src/expect/getter.c +++ b/src/expect/getter.c @@ -37,7 +37,7 @@ static const void *get_exp_attr_flags(const struct nf_expect *exp) return &exp->flags; } -get_exp_attr get_exp_attr_array[ATTR_EXP_MAX] = { +const get_exp_attr get_exp_attr_array[ATTR_EXP_MAX] = { [ATTR_EXP_MASTER] = get_exp_attr_master, [ATTR_EXP_EXPECTED] = get_exp_attr_expected, [ATTR_EXP_MASK] = get_exp_attr_mask, diff --git a/src/expect/setter.c b/src/expect/setter.c index 1270860..040b958 100644 --- a/src/expect/setter.c +++ b/src/expect/setter.c @@ -37,7 +37,7 @@ static void set_exp_attr_flags(struct nf_expect *exp, const void *value) exp->flags = *((u_int32_t *) value); } -set_exp_attr set_exp_attr_array[ATTR_EXP_MAX] = { +const set_exp_attr set_exp_attr_array[ATTR_EXP_MAX] = { [ATTR_EXP_MASTER] = set_exp_attr_master, [ATTR_EXP_EXPECTED] = set_exp_attr_expected, [ATTR_EXP_MASK] = set_exp_attr_mask, diff --git a/src/expect/snprintf_default.c b/src/expect/snprintf_default.c index be8d267..a20a3ad 100644 --- a/src/expect/snprintf_default.c +++ b/src/expect/snprintf_default.c @@ -23,7 +23,7 @@ int __snprintf_expect_default(char *buf, unsigned int flags) { int ret = 0, size = 0, offset = 0; - char *delim = ""; + const char *delim = ""; switch(msg_type) { case NFCT_T_NEW: -- cgit v1.2.3