>>> On 21.12.15 at 18:16, <andrew.coop...@citrix.com> wrote:
> c/s 506db90 "x86/HVM: merge HVM and PVH hypercall tables" introduced a path
> whereby 'okay' was used uninitialised, with broke compilation on CentOS 7.

It appeared to be used uninitialized, but wasn't in fact (i.e. the
outcome - the value rc gets set to - didn't depend on the value
due to

        if ( unlikely(!okay) && !rc )
            rc = -EINVAL;

being equivalent to

        if ( !rc && unlikely(!okay) )
            rc = -EINVAL;

(no side effects for the expressions on either side of the &&).
I'll re-word accordingly upon committing, to not give the false
impression of there having been other than a cosmetic problem.

> Splitting the error handling like this is fragile and unnecessary.  Drop the
> okay variable entirely and just use rc directly, substituting rc = -EINVAL/0
> for okay = 0/1.
> 
> In addition, two error messages are updated to print rc, and some stray
> whitespace is dropped.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to