Samuel Pitoiset <[email protected]> writes: >> +static void F(AVBlowfish *bf, uint32_t *xl, uint32_t *xr, int i) >> +{ >> + uint32_t Xl, Xr; >> + uint32_t y; >> + >> + Xl = *xl; >> + Xr = *xr; >> + >> + Xl ^= bf->p[i]; >> + y = bf->s[0][(Xl >> 24) & 0xFF]; >> + y += bf->s[1][(Xl >> 16) & 0xFF]; >> + y ^= bf->s[2][(Xl >> 8) & 0xFF]; >> + y += bf->s[3][ Xl & 0xFF]; >> + Xr ^= y; >> + >> + FFSWAP(uint32_t, Xl, Xr); > > I think this FFSWAP call is pointless too, right?
Yes, you can swap the names below instead. FFSWAP is generally only useful on memory locations (or global variables), as the effect there is persistent. If used on local variables, the compiler will hopefully notice that it doesn't actually have to do anything, so it is simply visual clutter in most cases. If the following code uses macros with hardcoded variable names, it might still be useful, but such macros should be avoided in the first place. >> + >> + *xl = Xl; >> + *xr = Xr; >> +} -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
