virBitmapNewCopy;
virBitmapNewData;
virBitmapNewEmpty;
-virBitmapNewQuiet;
virBitmapNewString;
virBitmapNextClearBit;
virBitmapNextSetBit;
/**
- * virBitmapNewQuiet:
+ * virBitmapNew:
* @size: number of bits
*
* Allocate a bitmap capable of containing @size bits.
* Returns a pointer to the allocated bitmap.
*/
virBitmapPtr
-virBitmapNewQuiet(size_t size)
+virBitmapNew(size_t size)
{
virBitmapPtr bitmap;
size_t sz;
}
-/**
- * virBitmapNew:
- * @size: number of bits
- *
- * Allocate a bitmap capable of containing @size bits.
- *
- * Returns a pointer to the allocated bitmap or NULL if either memory cannot be
- * allocated or size is 0. Reports libvirt errors.
- */
-virBitmapPtr
-virBitmapNew(size_t size)
-{
- virBitmapPtr ret;
-
- if (!(ret = virBitmapNewQuiet(size)))
- virReportOOMError();
-
- return ret;
-}
-
-
/**
* virBitmapNewEmpty:
*
/*
* Allocate a bitmap capable of containing @size bits.
*/
-virBitmapPtr virBitmapNewQuiet(size_t size) G_GNUC_WARN_UNUSED_RESULT;
virBitmapPtr virBitmapNew(size_t size);
virBitmapPtr virBitmapNewEmpty(void) G_GNUC_WARN_UNUSED_RESULT;
maxelem = elems[i];
}
- if (!(*bitmap = virBitmapNewQuiet(maxelem + 1)))
- return -1;
+ *bitmap = virBitmapNew(maxelem + 1);
/* second pass sets the correct bits in the map */
for (i = 0; i < val->data.array.nvalues; i++)
if (!(fp = fopen("/proc/cpuinfo", "r")))
return NULL;
- if (!(flags = virBitmapNewQuiet(VIR_HOST_VALIDATE_CPU_FLAG_LAST)))
- goto cleanup;
+ flags = virBitmapNew(VIR_HOST_VALIDATE_CPU_FLAG_LAST);
do {
char line[1024];
virStringListFreeCount(tokens, ntokens);
} while (1);
- cleanup:
VIR_FORCE_FCLOSE(fp);
return flags;