Re: [PATCH] Avoid the casts in calls to queue function and macros

2013-12-20 Thread Marin Ramesa
On 20.12.2013 19:41:14, Marin Ramesa wrote: > - insque((queue_entry_t) telt, ((queue_entry_t)next)->prev); > + insque(&(telt->chain), *(&(next->chain).prev)); This should be simply: - insque((queue_entry_t) telt, ((queue_entry_t)next)->prev); + insque(&(telt->chain), next->cha

[PATCH] Avoid the casts in calls to queue function and macros

2013-12-20 Thread Marin Ramesa
Avoid the casts by specifying addresses of queue_chain_t members. If the order of members in the structures ever changes, the code will be correct. --- device/net_io.c | 4 ++-- kern/mach_clock.c | 10 +- kern/processor.c | 2 +- kern/sched_prim.c | 14 +++--- kern/task.c