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

Re: [Xen-devel] [PATCH 32/34] tools/libxl: list_domains: shutdown is typed unsigned



On 25/03/14 16:55, Julien Grall wrote:
> Don't need to check if shutdown is positive.
>
> Fix compilation with clang 3.5:
> xl_cmdimpl.c:3350:34: error: comparison of unsigned expression >= 0 is always 
> true [-Werror,-Wtautological-compare]
>                 (shutdown_reason >= 0 &&
>                  ~~~~~~~~~~~~~~~ ^  ~

Coverity-ID: 1055616

> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
>  tools/libxl/xl_cmdimpl.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 8389468..e82620d 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -3324,8 +3324,7 @@ static void list_domains(int verbose, int context, int 
> claim, int numa,
>                  info[i].blocked ? 'b' : '-',
>                  info[i].paused ? 'p' : '-',
>                  info[i].shutdown ? 's' : '-',
> -                (shutdown_reason >= 0 &&
> -                 shutdown_reason < sizeof(shutdown_reason_letters)-1
> +                (shutdown_reason < sizeof(shutdown_reason_letters)-1
>                   ? shutdown_reason_letters[shutdown_reason] : '?'),
>                  info[i].dying ? 'd' : '-',
>                  ((float)info[i].cpu_time / 1e9));


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


 


Rackspace

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