From 2ba043d04468261cc767a3b91cec6df4b2238950 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 11 Jul 2015 13:27:58 +0200 Subject: kern: make sure the queue macros are only used on queues This turns mistakes as the one corrected in e59f05e9 into compile-time errors. * kern/queue.h: Add a new macro, queue_assert, and use it to assert that all arguments given to the queue macros have the correct type. * device/net_io.c (ENQUEUE_DEAD): Adapt to the fact that `queue_next(q)' is no longer an lvalue. --- device/net_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'device') diff --git a/device/net_io.c b/device/net_io.c index d2928cc5..47ef2ea8 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -353,7 +353,7 @@ decl_simple_lock_data(,net_hash_header_lock) /* entry_p must be net_rcv_port_t or net_hash_entry_t */ #define ENQUEUE_DEAD(dead, entry_p, chain) { \ - queue_next(&(entry_p)->chain) = (queue_entry_t) (dead); \ + (entry_p)->chain.next = (queue_entry_t) (dead); \ (dead) = (queue_entry_t)(entry_p); \ } -- cgit v1.2.3