Am 12.07.2016 um 18:24 schrieb Paolo Bonzini:

On 12/07/2016 17:54, Eric Blake wrote:
On 07/12/2016 12:48 AM, Fam Zheng wrote:
MIN_NON_ZERO(0, 1) is evaluated to 0. Rewrite the macro to fix it.
Huh?

Old expansion, in various stages:

(((0) != 0 && (0) < (1)) ? (0) : (1))
((0 && 1) ? 0 : 1)
(0 ? 0 : 1)
1

Maybe you meant MIN_NON_ZERO(1, 0), which evaluates to:

(((1) != 0 && (1) < (0)) ? (1) : (0))
((1 && 0) ? 1 : 0)
(0 ? 1 : 0)
0

in which case, you are correct that there is a bug.
Commit message fixed, patch queued.

Paolo

Shouldn't we Cc qemu-stable?

Peter

Reply via email to