summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--include/queue.h2
-rw-r--r--src/queue.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 557ef83..6f6f890 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@ o fix logfiles permissions, do not default to umask
o wake up the daemon iff there are real events to handle instead of polling
o add support for tagged vlan interfaces in the config file, e.g. eth0.1
o improve alarm framework based on suggestions from Max Kellerman
+o constify queue_iterate()
Max Kellermann <max@duempel.org>:
diff --git a/include/queue.h b/include/queue.h
index f568da4..2e08e56 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -25,7 +25,7 @@ unsigned int queue_len(const struct queue *b);
int queue_add(struct queue *b, const void *data, size_t size);
void queue_del(struct queue *b, void *data);
void queue_iterate(struct queue *b,
- void *data,
+ const void *data,
int (*iterate)(void *data1, void *data2));
#endif
diff --git a/src/queue.c b/src/queue.c
index e73d692..1c31157 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -109,7 +109,7 @@ void queue_del(struct queue *b, void *data)
}
void queue_iterate(struct queue *b,
- void *data,
+ const void *data,
int (*iterate)(void *data1, void *data2))
{
struct list_head *i, *tmp;