
On Thu, Feb 19, 2015 at 18:38:38 -0500, John Ferlan wrote:
On 02/16/2015 01:52 PM, Peter Krempa wrote:
The function uses the cell count in 6 places. Add a temp variable to hold the count as it will greatly simplify the refactor. --- src/qemu/qemu_command.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
ACK - had to peek forward a few patches to "see" why this becomes important though ;-)... I did ask myself - was there anything from the time it's defined/pulled from def->cpu->ncells to each time it was where the 'ncells' could change (I don't think so, but it does cross my mind when I see these).
In that case the code would actually be a terrible spaghetti mess and would deserve an even bigger refactor :). In fact ncells is changed only when parsing the domain XML so this change is safe. Peter