]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commit
minios: fix incorrect {, un}likely() definitions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 2 Jul 2014 12:46:42 +0000 (14:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Jul 2014 12:46:42 +0000 (14:46 +0200)
commit72553d3a4c8adf716c8c2d43f6998b3fa80cebb3
tree68bf2fc20765e01e481d056d74219dab4f68713d
parent60e17c5fd3af11b63fe3176c18f6adddaf749a41
minios: fix incorrect {, un}likely() definitions

As identified in e5545fb6, likely() and unlikely() must convert their
expressions to booleans before comparing to 1 or 0, to avoid truncation
issues.

While editing this file, add inclusion guards.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
include/compiler.h