Re: [PATCH] readelf: Remove show_op_index variable

2021-02-05 Thread Mark Wielaard
Hi Timm, On Tue, 2021-02-02 at 11:23 +0100, Timm Bäder via Elfutils-devel wrote: > advance_pc() uses show_op_index to save whether the current op_index > is > > 0 OR the new op_index is > 0. > > The new op index is calculated via > > new_op_index = (op_index + op_advance) % max_ops_per_instr; >

[PATCH] readelf: Remove show_op_index variable

2021-02-02 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder advance_pc() uses show_op_index to save whether the current op_index is > 0 OR the new op_index is > 0. The new op index is calculated via new_op_index = (op_index + op_advance) % max_ops_per_instr; since all of the variables involved are unsigned, new_op_index >= op_index is