+Wed Jan 28 15:45:11 +0100 2009 Jim Meyering <meyering@redhat.com>
+
+ qparams.c: Use virReportOOMError(NULL), not qparam_report_oom()
+ * src/qparams.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
+ (qparam_report_oom): Remove definition.
+ Replace all uses.
+
Wed Jan 28 14:24:45 GMT 2009 John Levon <john.levon@sun.com>
* src/xend_internal.c: fix mis-use of PF_UNIX as a protocol
-/* Copyright (C) 2007 Red Hat, Inc.
+/* Copyright (C) 2007, 2009 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "memory.h"
#include "qparams.h"
-#define qparam_report_oom(void) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, VIR_ERR_NO_MEMORY, \
- __FILE__, __FUNCTION__, __LINE__, NULL)
+#define VIR_FROM_THIS VIR_FROM_NONE
struct qparam_set *
new_qparam_set (int init_alloc, ...)
if (init_alloc <= 0) init_alloc = 1;
if (VIR_ALLOC(ps) < 0) {
- qparam_report_oom();
+ virReportOOMError(NULL);
return NULL;
}
ps->n = 0;
ps->alloc = init_alloc;
if (VIR_ALLOC_N(ps->p, ps->alloc) < 0) {
VIR_FREE (ps);
- qparam_report_oom();
+ virReportOOMError(NULL);
return NULL;
}
{
if (ps->n >= ps->alloc) {
if (VIR_REALLOC_N(ps->p, ps->alloc * 2) < 0) {
- qparam_report_oom();
+ virReportOOMError(NULL);
return -1;
}
ps->alloc *= 2;
pname = strdup (name);
if (!pname) {
- qparam_report_oom();
+ virReportOOMError(NULL);
return -1;
}
pvalue = strdup (value);
if (!pvalue) {
VIR_FREE (pname);
- qparam_report_oom();
+ virReportOOMError(NULL);
return -1;
}
}
if (virBufferError(&buf)) {
- qparam_report_oom();
+ virReportOOMError(NULL);
return NULL;
}
ps = new_qparam_set (0, NULL);
if (!ps) {
- qparam_report_oom();
+ virReportOOMError(NULL);
return NULL;
}
return ps;
out_of_memory:
- qparam_report_oom();
+ virReportOOMError(NULL);
free_qparam_set (ps);
return NULL;
}