summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-15 12:53:58 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-15 12:53:58 +0000
commit17c3451c18389990d74936e79ee19a4aa15e97d0 (patch)
tree3d3364c3120ad361b8951a1302be79bf83c2de4c /src
parentb861a707522e8625b4a5b4145b97a8825037572f (diff)
downloadconntrack-tools-17c3451c18389990d74936e79ee19a4aa15e97d0.tar.gz
conntrack-tools-17c3451c18389990d74936e79ee19a4aa15e97d0.zip
Max Kellermann <max@duempel.org>:
use const when possible
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c2
-rw-r--r--src/cache.c2
-rw-r--r--src/hash.c2
-rw-r--r--src/queue.c2
-rw-r--r--src/sync-ftfw.c4
5 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 3283c15..4f60123 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -61,7 +61,7 @@ void buffer_flush(struct buffer *b,
memset(b->data, 0, b->size);
}
-unsigned int buffer_size(struct buffer *b)
+unsigned int buffer_size(const struct buffer *b)
{
return b->size;
}
diff --git a/src/cache.c b/src/cache.c
index b92957a..a0950d5 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -398,7 +398,7 @@ void *cache_get_extra(struct cache *c, void *data)
return data + c->extra_offset;
}
-void cache_stats(struct cache *c, int fd)
+void cache_stats(const struct cache *c, int fd)
{
char buf[512];
int size;
diff --git a/src/hash.c b/src/hash.c
index 274a140..3ed6ad2 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -193,7 +193,7 @@ int hashtable_iterate(struct hashtable *table, void *data,
return 0;
}
-unsigned int hashtable_counter(struct hashtable *table)
+unsigned int hashtable_counter(const struct hashtable *table)
{
return table->count;
}
diff --git a/src/queue.c b/src/queue.c
index 3413013..e73d692 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -122,7 +122,7 @@ void queue_iterate(struct queue *b,
}
}
-unsigned int queue_len(struct queue *b)
+unsigned int queue_len(const struct queue *b)
{
return b->num_elems;
}
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c
index 8452e2e..0d57f36 100644
--- a/src/sync-ftfw.c
+++ b/src/sync-ftfw.c
@@ -161,7 +161,7 @@ static int ftfw_local(int fd, int type, void *data)
static int rs_queue_to_tx(void *data1, void *data2)
{
struct nethdr *net = data1;
- struct nethdr_ack *nack = data2;
+ const struct nethdr_ack *nack = data2;
if (between(net->seq, nack->from, nack->to)) {
dp("rs_queue_to_tx sq: %u fl:%u len:%u\n",
@@ -174,7 +174,7 @@ static int rs_queue_to_tx(void *data1, void *data2)
static int rs_queue_empty(void *data1, void *data2)
{
struct nethdr *net = data1;
- struct nethdr_ack *h = data2;
+ const struct nethdr_ack *h = data2;
if (between(net->seq, h->from, h->to)) {
dp("remove from queue (seq=%u)\n", net->seq);