Re: [RFC 1/1 linux-next] tools/lguest: update variables to avoid setreg(eax, eax)

2015-06-23 Thread Rusty Russell
Fabian Frederick writes: > eax is used for offset calculation but is also a local > variable used to store register value. Well, it's the value we're going to put back in eax. And it came from eax. Renaming val to def_val is weird, since it's not the default. You can tell it's set in various p

[RFC 1/1 linux-next] tools/lguest: update variables to avoid setreg(eax, eax)

2015-06-16 Thread Fabian Frederick
eax is used for offset calculation but is also a local variable used to store register value. Use val for value and defval for default value to remove this ambiguity. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick --- tools/lguest/lguest.c | 26