KVM: Fix overflow bug in overflow detection code
The expression sp - 6 < sp where sp is a u16 is undefined in C since 'sp - 6' is promoted to int, and signed overflow is undefined in C. gcc 4.2 actually warns about it. Replace with a simpler test. Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de> Signed-off-by: NAvi Kivity <avi@qumranet.com>
Showing
想要评论请 注册 或 登录