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

Re: [Xen-devel] Why cast to "signed short" before checking the return value of gnttab_claim_grant_reference() in xen-netfront.c?



On 28/10/16 07:46, Dongli Zhang wrote:
> Hi,
> 
> Would anyone please help with a question on xen-netfront.c code?
> 
> In xen-netfront.c, the return value of gnttab_claim_grant_reference() is
> checked with "BUG_ON((signed short)ref < 0);". Why we use signed short here
> while the return value is of uint32_t? 

That's wrong.  Please just remove that BUG_ON() it isn't useful.

David

_______________________________________________
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®.