Re: [PATCH] xen/pvcalls: fix unsigned less than zero error check

2017-11-08 Thread Boris Ostrovsky
On 11/03/2017 05:01 AM, Juergen Gross wrote: > On 03/11/17 09:42, Colin King wrote: >> From: Colin Ian King >> >> The check on bedata->ref is never true because ref is an unsigned >> integer. Fix this by assigning signed int ret to the return of the >> call to gnttab_claim_grant_reference so the -

Re: [PATCH] xen/pvcalls: fix unsigned less than zero error check

2017-11-03 Thread Juergen Gross
On 03/11/17 09:42, Colin King wrote: > From: Colin Ian King > > The check on bedata->ref is never true because ref is an unsigned > integer. Fix this by assigning signed int ret to the return of the > call to gnttab_claim_grant_reference so the -ve return can be checked. > > Detected by Coverity

[PATCH] xen/pvcalls: fix unsigned less than zero error check

2017-11-03 Thread Colin King
From: Colin Ian King The check on bedata->ref is never true because ref is an unsigned integer. Fix this by assigning signed int ret to the return of the call to gnttab_claim_grant_reference so the -ve return can be checked. Detected by CoverityScan, CID#1460358 ("Unsigned compared against 0")