From 69f564e3890976461de0016cd81171ff8bfa8353 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 26 May 2009 13:14:06 +0200 Subject: extensions: add const qualifiers in print/save functions Signed-off-by: Jan Engelhardt --- extensions/libipt_SAME.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'extensions/libipt_SAME.c') diff --git a/extensions/libipt_SAME.c b/extensions/libipt_SAME.c index a07d9f48..5cb0d3f4 100644 --- a/extensions/libipt_SAME.c +++ b/extensions/libipt_SAME.c @@ -138,14 +138,13 @@ static void SAME_print(const void *ip, const struct xt_entry_target *target, int numeric) { unsigned int count; - struct ipt_same_info *mr - = (struct ipt_same_info *)target->data; + const struct ipt_same_info *mr = (const void *)target->data; int random_selection = 0; printf("same:"); for (count = 0; count < mr->rangesize; count++) { - struct nf_nat_range *r = &mr->range[count]; + const struct nf_nat_range *r = &mr->range[count]; struct in_addr a; a.s_addr = r->min_ip; @@ -171,12 +170,11 @@ static void SAME_print(const void *ip, const struct xt_entry_target *target, static void SAME_save(const void *ip, const struct xt_entry_target *target) { unsigned int count; - struct ipt_same_info *mr - = (struct ipt_same_info *)target->data; + const struct ipt_same_info *mr = (const void *)target->data; int random_selection = 0; for (count = 0; count < mr->rangesize; count++) { - struct nf_nat_range *r = &mr->range[count]; + const struct nf_nat_range *r = &mr->range[count]; struct in_addr a; a.s_addr = r->min_ip; -- cgit v1.2.3