aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_CLUSTERIP.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2008-04-14 03:56:05 -0400
committerPatrick McHardy <kaber@trash.net>2008-04-14 03:56:05 -0400
commit3cf93c96af7adf78542d45f8a27f0e5f8704409d (patch)
tree1559a1c55ef406f9aa8efdc2d5dc8ed42059c1df /net/ipv4/netfilter/ipt_CLUSTERIP.c
parentb9f61b160336da5eaaacb0cb41ebe32169e3bde5 (diff)
[NETFILTER]: annotate xtables targets with const and remove casts
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4/netfilter/ipt_CLUSTERIP.c')
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 965b08a7d73..2510d4fcdb5 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -142,7 +142,7 @@ clusterip_config_init_nodelist(struct clusterip_config *c,
142} 142}
143 143
144static struct clusterip_config * 144static struct clusterip_config *
145clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, 145clusterip_config_init(const struct ipt_clusterip_tgt_info *i, __be32 ip,
146 struct net_device *dev) 146 struct net_device *dev)
147{ 147{
148 struct clusterip_config *c; 148 struct clusterip_config *c;
@@ -416,7 +416,7 @@ clusterip_tg_check(const char *tablename, const void *e_void,
416/* drop reference count of cluster config when rule is deleted */ 416/* drop reference count of cluster config when rule is deleted */
417static void clusterip_tg_destroy(const struct xt_target *target, void *targinfo) 417static void clusterip_tg_destroy(const struct xt_target *target, void *targinfo)
418{ 418{
419 struct ipt_clusterip_tgt_info *cipinfo = targinfo; 419 const struct ipt_clusterip_tgt_info *cipinfo = targinfo;
420 420
421 /* if no more entries are referencing the config, remove it 421 /* if no more entries are referencing the config, remove it
422 * from the list and destroy the proc entry */ 422 * from the list and destroy the proc entry */
@@ -565,7 +565,7 @@ struct clusterip_seq_position {
565 565
566static void *clusterip_seq_start(struct seq_file *s, loff_t *pos) 566static void *clusterip_seq_start(struct seq_file *s, loff_t *pos)
567{ 567{
568 struct proc_dir_entry *pde = s->private; 568 const struct proc_dir_entry *pde = s->private;
569 struct clusterip_config *c = pde->data; 569 struct clusterip_config *c = pde->data;
570 unsigned int weight; 570 unsigned int weight;
571 u_int32_t local_nodes; 571 u_int32_t local_nodes;
@@ -592,7 +592,7 @@ static void *clusterip_seq_start(struct seq_file *s, loff_t *pos)
592 592
593static void *clusterip_seq_next(struct seq_file *s, void *v, loff_t *pos) 593static void *clusterip_seq_next(struct seq_file *s, void *v, loff_t *pos)
594{ 594{
595 struct clusterip_seq_position *idx = (struct clusterip_seq_position *)v; 595 struct clusterip_seq_position *idx = v;
596 596
597 *pos = ++idx->pos; 597 *pos = ++idx->pos;
598 if (*pos >= idx->weight) { 598 if (*pos >= idx->weight) {
@@ -611,7 +611,7 @@ static void clusterip_seq_stop(struct seq_file *s, void *v)
611 611
612static int clusterip_seq_show(struct seq_file *s, void *v) 612static int clusterip_seq_show(struct seq_file *s, void *v)
613{ 613{
614 struct clusterip_seq_position *idx = (struct clusterip_seq_position *)v; 614 struct clusterip_seq_position *idx = v;
615 615
616 if (idx->pos != 0) 616 if (idx->pos != 0)
617 seq_putc(s, ','); 617 seq_putc(s, ',');
@@ -667,7 +667,7 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input,
667{ 667{
668#define PROC_WRITELEN 10 668#define PROC_WRITELEN 10
669 char buffer[PROC_WRITELEN+1]; 669 char buffer[PROC_WRITELEN+1];
670 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 670 const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
671 struct clusterip_config *c = pde->data; 671 struct clusterip_config *c = pde->data;
672 unsigned long nodenum; 672 unsigned long nodenum;
673 673