[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/1] kexec: ensure kexec_status() return bit value of 0 or 1



>>> On 19.01.17 at 18:10, <eric.devolder@xxxxxxxxxx> wrote:
> --- a/xen/common/kexec.c
> +++ b/xen/common/kexec.c
> @@ -1182,7 +1182,8 @@ static int kexec_status(XEN_GUEST_HANDLE_PARAM(void) 
> uarg)
>      if ( kexec_load_get_bits(status.type, &base, &bit) )
>          return -EINVAL;
>  
> -    return test_bit(bit, &kexec_flags);
> +    /* Ensure return bit value of 0 or 1 */
> +    return !!test_bit(bit, &kexec_flags);
>  }

I don't see the point of adding a comment here, but I'll let Andrew as
the maintainer judge. In any event
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.