summaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-11 13:27:58 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-11 13:38:45 +0200
commit2ba043d04468261cc767a3b91cec6df4b2238950 (patch)
tree4162bd71db9d4e4ead209af5d5595805e78abe39 /device
parente59f05e940643350bb3813e5b7f18f9fe54806f6 (diff)
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.
Diffstat (limited to 'device')
-rw-r--r--device/net_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/net_io.c b/device/net_io.c
index d2928cc..47ef2ea 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); \
}