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

Re: [Xen-devel] [PATCH 04 of 11] libxl: expand the libxl_{cpu, node}map API a bit



On Thu, 2012-05-31 at 16:51 +0100, George Dunlap wrote:
> > +int libxl_map_is_full(struct libxl_map *map)
> > +{
> > +    int i;
> > +
> > +    for (i = 0; i<  map->size; i++)
> > +        if (map->map[i] != (uint8_t)-1)
> > +            return -1;
> > +    return 0;
> > +}
> Why are you returning -1 and 0 for false and true, rather than 0 and 1?  
> None of the other libxl "_is_" functions (e.g., libxl_is_stubom()) do that.
> 
Oh, well, it seemed natural to me as well for true to be 1, but that
would have meant giving 0 a different meaning than 'everything is ok',
and I didn't find relevant examples of it being done... Thanks for
pointing this out, I'll change it.

Thanks and Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

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