summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-26 12:09:33 -0700
committerMatt Turner <[email protected]>2016-06-30 11:08:39 -0700
commite3d9125b770e830db0c01179f08d4a121c2adaaa (patch)
treecdbe35c1bdaa4d6403ba6b901b6f9992f87c7ee5 /src/mesa/drivers/dri
parentc4e47ab971f8a7ee5e6c34e3e29a6fc3d06d4414 (diff)
i965: Simplify foreach_inst_in_block_safe() macro.
We know what the end looks like without examining .tail: it's NULL. It's always NULL.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index 5b770aa7af1..1c90eab5eba 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.h
+++ b/src/mesa/drivers/dri/i965/brw_cfg.h
@@ -334,9 +334,8 @@ struct cfg_t {
#define foreach_inst_in_block_safe(__type, __inst, __block) \
for (__type *__inst = (__type *)__block->instructions.head, \
- *__next = (__type *)__inst->next, \
- *__end = (__type *)__block->instructions.tail; \
- __next != __end; \
+ *__next = (__type *)__inst->next; \
+ __next != NULL; \
__inst = __next, \
__next = (__type *)__next->next)