diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-03-21 16:25:52 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-09-16 12:32:20 +0200 |
commit | c95cfd040078db8017f74fd3a4d6f798385d960c (patch) | |
tree | 42212776fe9a05bd0c2feb4c963985c95ef90e5f /tests/qapi-schema/doc-duplicated-since.out | |
parent | 56b15076805a29673c1a90ea9c3ebef25bfcc912 (diff) |
exec.c: get nodes_nb_alloc with one MAX calculation
The purpose of these two MAX here is to get the maximum of these three
variables:
A: map->nodes_nb + nodes
B: map->nodes_nb_alloc
C: alloc_hint
We can write it like MAX(A, B, C). Since the if condition says A > B,
this means MAX(A, B, C) = MAX(A, C).
This patch just simplify the calculation a bit.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190321082555.21118-4-richardw.yang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/qapi-schema/doc-duplicated-since.out')
0 files changed, 0 insertions, 0 deletions