OSDN Git Service

m48t59-test: avoid possible overflow on ABS
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 25 Sep 2023 10:27:24 +0000 (12:27 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Sep 2023 14:39:29 +0000 (16:39 +0200)
commit168d46749d19f4808022b9a88c0846b3286aed59
tree9b04ba321c0a23063f469a149e2e5d903b3a865f
parent973d3ea5a1c0573149b7004108276ca01cb05fd2
m48t59-test: avoid possible overflow on ABS

Originally meant to avoid a shadowed variable "s", which was fixed by
renaming the outer declaration to "qts".  Avoid the chance of an overflow
in the computation of ABS(t - s).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/m48t59-test.c