
I am really sorry. I sent an older version of the patch, here is the correct one. Eric Blake wrote:
On 03/24/2010 11:19 AM, Eduardo Otubo wrote:
/* exit early if there are no domains */ - if (nids == 0) + if (nids_numdomains == 0 || nids_listdomains == 0 + || nids_numdomains != nids_listdomains) return 0;
Should we be reporting an error here...
- if (VIR_ALLOC_N(ids, nids) < 0) { + if (VIR_ALLOC_N(ids, nids_listdomains) < 0) { virReportOOMError(); goto err; }
- if ((nids = phypListDomainsGeneric(conn, ids, nids, 1)) < 0) - goto err; - - /* exit early if there are no domains */ - /* FIXME: phypNumDomainsGeneric() returned > 0 but phypListDomainsGeneric() - * returned 0. indicates this an error condition? - * an even stricter check would be to treat - * - * phypNumDomainsGeneric() != phypListDomainsGeneric() - * - * as an error */
...given this comment? You treated it as an early exit of 0, even if both values were non-zero.
-- Eduardo Otubo Software Engineer Linux Technology Center IBM Systems & Technology Group Mobile: +55 19 8135 0885 eotubo@linux.vnet.ibm.com