]> err.no Git - linux-2.6/blobdiff - net/netfilter/nf_conntrack_standalone.c
[TCP]: tcp_packets_out_inc to tcp_output.c (no callers elsewhere)
[linux-2.6] / net / netfilter / nf_conntrack_standalone.c
index 54498bcfa862406a730c87bd404faa47d30cfa33..a4ce5e8879974c14e36f969b4d9c787d2ba41362 100644 (file)
@@ -181,11 +181,11 @@ static int ct_seq_show(struct seq_file *s, void *v)
 
        if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use)))
                return -ENOSPC;
-       
+
        return 0;
 }
 
-static struct seq_operations ct_seq_ops = {
+static const struct seq_operations ct_seq_ops = {
        .start = ct_seq_start,
        .next  = ct_seq_next,
        .stop  = ct_seq_stop,
@@ -198,7 +198,7 @@ static int ct_open(struct inode *inode, struct file *file)
        struct ct_iter_state *st;
        int ret;
 
-       st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
+       st = kzalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
        if (st == NULL)
                return -ENOMEM;
        ret = seq_open(file, &ct_seq_ops);
@@ -206,7 +206,6 @@ static int ct_open(struct inode *inode, struct file *file)
                goto out_free;
        seq          = file->private_data;
        seq->private = st;
-       memset(st, 0, sizeof(struct ct_iter_state));
        return ret;
 out_free:
        kfree(st);
@@ -289,7 +288,7 @@ static int ct_cpu_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations ct_cpu_seq_ops = {
+static const struct seq_operations ct_cpu_seq_ops = {
        .start  = ct_cpu_seq_start,
        .next   = ct_cpu_seq_next,
        .stop   = ct_cpu_seq_stop,