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

[libvirt] [PATCH 1/9] Remove conn parameter from virReportOOMError



---
 HACKING                                            |   10 +-
 daemon/libvirtd.c                                  |    8 +-
 daemon/remote.c                                    |    2 +-
 ...-Step-7-of-8-Implement-the-driver-methods.patch |   20 ++--
 docs/hacking.html.in                               |   10 +-
 src/conf/cpu_conf.c                                |    8 +-
 src/conf/domain_conf.c                             |   82 +++++-----
 src/conf/domain_event.c                            |   12 +-
 src/conf/interface_conf.c                          |   26 ++--
 src/conf/network_conf.c                            |   24 ++--
 src/conf/node_device_conf.c                        |   18 +-
 src/conf/secret_conf.c                             |    6 +-
 src/conf/storage_conf.c                            |   38 +++---
 src/conf/storage_encryption_conf.c                 |    8 +-
 src/cpu/cpu.c                                      |    2 +-
 src/cpu/cpu_generic.c                              |    2 +-
 src/cpu/cpu_map.c                                  |    2 +-
 src/cpu/cpu_x86.c                                  |   18 +-
 src/datatypes.c                                    |   36 +++---
 src/esx/esx_driver.c                               |   36 +++---
 src/esx/esx_util.c                                 |   10 +-
 src/esx/esx_vi.c                                   |   24 ++--
 src/esx/esx_vi_methods.c                           |   38 +++---
 src/esx/esx_vi_types.c                             |   10 +-
 src/esx/esx_vmx.c                                  |   50 +++---
 src/interface/netcf_driver.c                       |    2 +-
 src/libvirt.c                                      |    6 +-
 src/lxc/lxc_conf.c                                 |    2 +-
 src/lxc/lxc_container.c                            |   18 +-
 src/lxc/lxc_controller.c                           |   10 +-
 src/lxc/lxc_driver.c                               |   23 ++--
 src/network/bridge_driver.c                        |   25 ++--
 src/node_device/node_device_driver.c               |   16 +-
 src/node_device/node_device_linux_sysfs.c          |   14 +-
 src/node_device/node_device_udev.c                 |   34 ++--
 src/opennebula/one_conf.c                          |    6 +-
 src/opennebula/one_conf.h                          |    2 +-
 src/opennebula/one_driver.c                        |    8 +-
 src/openvz/openvz_conf.c                           |   10 +-
 src/openvz/openvz_driver.c                         |   12 +-
 src/phyp/phyp_driver.c                             |   76 +++++-----
 src/qemu/qemu_conf.c                               |  136 ++++++++---------
 src/qemu/qemu_driver.c                             |  114 +++++++-------
 src/qemu/qemu_monitor.c                            |    2 +-
 src/qemu/qemu_monitor_json.c                       |   40 +++---
 src/qemu/qemu_monitor_text.c                       |   80 +++++-----
 src/remote/remote_driver.c                         |   50 +++---
 src/secret/secret_driver.c                         |   34 +++--
 src/security/security_apparmor.c                   |   30 ++--
 src/security/security_selinux.c                    |    2 +-
 src/storage/storage_backend.c                      |   22 ++--
 src/storage/storage_backend_disk.c                 |   14 +-
 src/storage/storage_backend_fs.c                   |   24 ++--
 src/storage/storage_backend_iscsi.c                |    8 +-
 src/storage/storage_backend_logical.c              |   24 ++--
 src/storage/storage_backend_mpath.c                |   12 +-
 src/storage/storage_backend_scsi.c                 |   24 ++--
 src/storage/storage_driver.c                       |   16 +-
 src/test/test_driver.c                             |   90 ++++++------
 src/uml/uml_conf.c                                 |   16 +-
 src/uml/uml_driver.c                               |   30 ++--
 src/util/conf.c                                    |   26 ++--
 src/util/hostusb.c                                 |    4 +-
 src/util/json.c                                    |    6 +-
 src/util/pci.c                                     |   12 +-
 src/util/processinfo.c                             |    4 +-
 src/util/qparams.c                                 |   16 +-
 src/util/storage_file.c                            |   14 +-
 src/util/util.c                                    |   20 ++--
 src/util/virterror.c                               |    6 +-
 src/util/virterror_internal.h                      |    8 +-
 src/util/xml.c                                     |    4 +-
 src/vbox/vbox_tmpl.c                               |  161 ++++++++++----------
 src/xen/block_stats.c                              |    2 +-
 src/xen/proxy_internal.c                           |    6 +-
 src/xen/sexpr.c                                    |    6 +-
 src/xen/xen_driver.c                               |   20 ++--
 src/xen/xen_hypervisor.c                           |   22 ++--
 src/xen/xen_inotify.c                              |    8 +-
 src/xen/xend_internal.c                            |   69 ++++-----
 src/xen/xm_internal.c                              |   51 +++---
 src/xen/xs_internal.c                              |   18 +-
 82 files changed, 1001 insertions(+), 1014 deletions(-)

diff --git a/HACKING b/HACKING
index 4bf216c..be8725d 100644
--- a/HACKING
+++ b/HACKING
@@ -171,7 +171,7 @@ routines, use the macros from memory.h
       virDomainPtr domain;
 
       if (VIR_ALLOC(domain) < 0) {
-          virReportOOMError(NULL);
+          virReportOOMError();
           return NULL;
       }
 
@@ -182,7 +182,7 @@ routines, use the macros from memory.h
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) < 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 
@@ -192,7 +192,7 @@ routines, use the macros from memory.h
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) < 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 
@@ -201,7 +201,7 @@ routines, use the macros from memory.h
        ndomains = 20
 
        if (VIR_REALLOC_N(domains, ndomains) < 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 
@@ -297,7 +297,7 @@ eg typical usage is as follows:
 
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
-         virReportOOMError(NULL);
+         virReportOOMError();
          return NULL;
      }
 
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index d858ccf..1c7e791 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -747,7 +747,7 @@ static int qemudInitPaths(struct qemud_server *server,
         if (server->privileged) {
             dir_prefix = strdup (LOCAL_STATE_DIR);
             if (dir_prefix == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto cleanup;
             }
             if (snprintf (sock_dir, maxlen, "%s/run/libvirt",
@@ -768,7 +768,7 @@ static int qemudInitPaths(struct qemud_server *server,
 
     sock_dir_prefix = strdup (sock_dir);
     if (!sock_dir_prefix) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -788,10 +788,10 @@ static int qemudInitPaths(struct qemud_server *server,
 
     if (server->privileged) {
         if (!(server->logDir = strdup (LOCAL_STATE_DIR "/log/libvirt")))
-            virReportOOMError(NULL);
+            virReportOOMError();
     } else {
         if (virAsprintf(&server->logDir, "%s/.libvirt/log", dir_prefix) < 0)
-            virReportOOMError(NULL);
+            virReportOOMError();
     }
 
     if (server->logDir == NULL)
diff --git a/daemon/remote.c b/daemon/remote.c
index 299f971..09a51b7 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -2824,7 +2824,7 @@ static char *addrToString(remote_error *rerr,
     }
 
     if (virAsprintf(&addr, "%s;%s", host, port) == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
diff --git a/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch b/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
index 38f57a6..f820b2c 100644
--- a/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
+++ b/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
@@ -141,7 +141,7 @@ index b84729f..4f73baf 100644
 +                    parent_host,
 +                    operation_file) < 0) {
 +
-+        virReportOOMError(conn);
++        virReportOOMError();
 +        retval = -1;
 +        goto cleanup;
 +    }
@@ -163,7 +163,7 @@ index b84729f..4f73baf 100644
 +                    wwpn,
 +                    wwnn) < 0) {
 +
-+        virReportOOMError(conn);
++        virReportOOMError();
 +        retval = -1;
 +        goto cleanup;
 +    }
@@ -223,7 +223,7 @@ index b84729f..4f73baf 100644
 +        VIR_FREE(wwnn);
 +        VIR_FREE(wwpn);
 +        ret = -1;
-+        virReportOOMError(conn);
++        virReportOOMError();
 +    }
 +
 +    return ret;
@@ -431,7 +431,7 @@ index b84729f..4f73baf 100644
 +    obj = NULL;
 +
 +    if (parent_name == NULL) {
-+        virReportOOMError(dev->conn);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -964,7 +964,7 @@ index 0000000..1deb6d2
 +    if (virAsprintf(&sysfs_path, "%s/host%d",
 +                    LINUX_SYSFS_FC_HOST_PREFIX,
 +                    d->scsi_host.host) < 0) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -977,7 +977,7 @@ index 0000000..1deb6d2
 +
 +    if (virAsprintf(&wwnn_path, "%s/node_name",
 +                    sysfs_path) < 0) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -1002,7 +1002,7 @@ index 0000000..1deb6d2
 +
 +    d->scsi_host.wwnn = strndup(p, sizeof(buf));
 +    if (d->scsi_host.wwnn == NULL) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -1013,7 +1013,7 @@ index 0000000..1deb6d2
 +
 +    if (virAsprintf(&wwpn_path, "%s/port_name",
 +                    sysfs_path) < 0) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -1038,7 +1038,7 @@ index 0000000..1deb6d2
 +
 +    d->scsi_host.wwpn = strndup(p, sizeof(buf));
 +    if (d->scsi_host.wwpn == NULL) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
@@ -1066,7 +1066,7 @@ index 0000000..1deb6d2
 +    if (virAsprintf(&sysfs_path, "%s/host%d/vport_create",
 +                    LINUX_SYSFS_FC_HOST_PREFIX,
 +                    d->scsi_host.host) < 0) {
-+        virReportOOMError(NULL);
++        virReportOOMError();
 +        goto out;
 +    }
 +
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 71b4f47..788a49b 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -192,7 +192,7 @@
       virDomainPtr domain;
 
       if (VIR_ALLOC(domain) &lt; 0) {
-          virReportOOMError(NULL);
+          virReportOOMError();
           return NULL;
       }
 </pre></li>
@@ -204,7 +204,7 @@
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) &lt; 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 </pre></li>
@@ -216,7 +216,7 @@
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) &lt; 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 </pre></li>
@@ -227,7 +227,7 @@
        ndomains = 20
 
        if (VIR_REALLOC_N(domains, ndomains) &lt; 0) {
-           virReportOOMError(NULL);
+           virReportOOMError();
            return NULL;
        }
 </pre></li>
@@ -314,7 +314,7 @@
 
      if (virBufferError(&amp;buf)) {
          virBufferFreeAndReset(&amp;buf);
-         virReportOOMError(NULL);
+         virReportOOMError();
          return NULL;
      }
 
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 244d670..002fde3 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -80,7 +80,7 @@ virCPUDefParseXML(virConnectPtr conn,
     unsigned int i;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -232,7 +232,7 @@ cleanup:
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 
 error:
     virCPUDefFree(def);
@@ -259,7 +259,7 @@ virCPUDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 cleanup:
     virBufferFreeAndReset(&buf);
     return NULL;
@@ -381,6 +381,6 @@ virCPUDefAddFeature(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     return -1;
 }
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 766993c..ee5be58 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -232,7 +232,7 @@ int virDomainObjListInit(virDomainObjListPtr doms)
 {
     doms->objs = virHashCreate(50);
     if (!doms->objs) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     return 0;
@@ -692,13 +692,13 @@ static virDomainObjPtr virDomainObjNew(virConnectPtr conn,
     virDomainObjPtr domain;
 
     if (VIR_ALLOC(domain) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
     if (caps->privateDataAllocFunc &&
         !(domain->privateData = (caps->privateDataAllocFunc)())) {
-        virReportOOMError(conn);
+        virReportOOMError();
         VIR_FREE(domain);
         return NULL;
     }
@@ -749,7 +749,7 @@ virDomainObjPtr virDomainAssignDef(virConnectPtr conn,
     virUUIDFormat(def->uuid, uuidstr);
     if (virHashAddEntry(doms->objs, uuidstr, domain) < 0) {
         VIR_FREE(domain);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1233,7 +1233,7 @@ virDomainDiskDefParseXML(virConnectPtr conn,
     char *serial = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1476,7 +1476,7 @@ virDomainControllerDefParseXML(virConnectPtr conn,
     char *idx = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1534,7 +1534,7 @@ virDomainFSDefParseXML(virConnectPtr conn,
     char *target = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1633,7 +1633,7 @@ virDomainNetDefParseXML(virConnectPtr conn,
     char *devaddr = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1930,7 +1930,7 @@ virDomainChrDefParseXML(virConnectPtr conn,
     virDomainChrDefPtr def;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2049,7 +2049,7 @@ virDomainChrDefParseXML(virConnectPtr conn,
                         goto error;
                     }
                     if (VIR_ALLOC(def->target.addr) < 0) {
-                        virReportOOMError(conn);
+                        virReportOOMError();
                         goto error;
                     }
                     if (virSocketParseAddr(addrStr, def->target.addr, 0) < 0)
@@ -2242,7 +2242,7 @@ virDomainInputDefParseXML(virConnectPtr conn,
     char *bus = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2330,7 +2330,7 @@ virDomainGraphicsDefParseXML(virConnectPtr conn,
     char *type = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2487,7 +2487,7 @@ virDomainSoundDefParseXML(virConnectPtr conn,
     virDomainSoundDefPtr def;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2524,7 +2524,7 @@ virDomainWatchdogDefParseXML(virConnectPtr conn,
     virDomainWatchdogDefPtr def;
 
     if (VIR_ALLOC (def) < 0) {
-        virReportOOMError (conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2624,7 +2624,7 @@ virDomainVideoDefaultType(virDomainDefPtr def)
 }
 
 static virDomainVideoAccelDefPtr
-virDomainVideoAccelDefParseXML(virConnectPtr conn, const xmlNodePtr node) {
+virDomainVideoAccelDefParseXML(const xmlNodePtr node) {
     xmlNodePtr cur;
     virDomainVideoAccelDefPtr def;
     char *support3d = NULL;
@@ -2646,7 +2646,7 @@ virDomainVideoAccelDefParseXML(virConnectPtr conn, const xmlNodePtr node) {
         return(NULL);
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2681,7 +2681,7 @@ virDomainVideoDefParseXML(virConnectPtr conn,
     char *vram = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2693,7 +2693,7 @@ virDomainVideoDefParseXML(virConnectPtr conn,
                 type = virXMLPropString(cur, "type");
                 vram = virXMLPropString(cur, "vram");
                 heads = virXMLPropString(cur, "heads");
-                def->accel = virDomainVideoAccelDefParseXML(conn, cur);
+                def->accel = virDomainVideoAccelDefParseXML(cur);
             }
         }
         cur = cur->next;
@@ -2933,7 +2933,7 @@ virDomainHostdevDefParseXML(virConnectPtr conn,
     char *mode, *type = NULL, *managed = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     def->target = NULL;
@@ -3141,7 +3141,7 @@ virDomainDeviceDefPtr virDomainDeviceDefParse(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(dev) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -3336,7 +3336,7 @@ static char *virDomainDefDefaultEmulator(virConnectPtr conn,
 
     retemu = strdup(emulator);
     if (!retemu)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return retemu;
 }
@@ -3352,7 +3352,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
     virDomainDefPtr def;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -3423,7 +3423,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
         char *set = tmp;
         def->cpumasklen = VIR_DOMAIN_CPUMASK_LEN;
         if (VIR_ALLOC_N(def->cpumask, def->cpumasklen) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         if (virDomainCpuSetParse(conn, (const char **)&set,
@@ -3476,7 +3476,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
         if (def->os.bootloader) {
             def->os.type = strdup("xen");
             if (!def->os.type) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto error;
             }
         } else {
@@ -3494,7 +3494,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
         def->virtType == VIR_DOMAIN_VIRT_XEN) {
         VIR_FREE(def->os.type);
         if (!(def->os.type = strdup("xen"))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
     }
@@ -3522,7 +3522,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
             goto error;
         }
         if (!(def->os.arch = strdup(defaultArch))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
     }
@@ -3535,7 +3535,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
                                                                         virDomainVirtTypeToString(def->virtType));
         if (defaultMachine != NULL) {
             if (!(def->os.machine = strdup(defaultMachine))) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto error;
             }
         }
@@ -3836,7 +3836,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
         virDomainInputDefPtr input;
 
         if (VIR_ALLOC(input) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         if (STREQ(def->os.type, "hvm")) {
@@ -3974,7 +3974,7 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     /* fallthrough */
 
  error:
@@ -4165,7 +4165,7 @@ virDomainDefPtr virDomainDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4236,7 +4236,7 @@ virDomainObjPtr virDomainObjParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4266,7 +4266,7 @@ static int virDomainDefMaybeAddDiskController(virDomainDefPtr def,
         return 0;
 
     if (VIR_ALLOC(cont) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -4275,7 +4275,7 @@ static int virDomainDefMaybeAddDiskController(virDomainDefPtr def,
 
     if (VIR_REALLOC_N(def->controllers, def->ncontrollers+1) < 0) {
         VIR_FREE(cont);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     def->controllers[def->ncontrollers] = cont;
@@ -4386,7 +4386,7 @@ virDomainCpuNumberParse(const char **str, int maxcpu)
  *         freed by the caller.
  */
 char *
-virDomainCpuSetFormat(virConnectPtr conn, char *cpuset, int maxcpu)
+virDomainCpuSetFormat(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/, char *cpuset, int maxcpu)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
     int start, cur;
@@ -4425,7 +4425,7 @@ virDomainCpuSetFormat(virConnectPtr conn, char *cpuset, int maxcpu)
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -5538,7 +5538,7 @@ char *virDomainDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  cleanup:
     virBufferFreeAndReset(&buf);
     return NULL;
@@ -5575,7 +5575,7 @@ char *virDomainObjFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virBufferFreeAndReset(&buf);
     return NULL;
@@ -5758,7 +5758,7 @@ static virDomainObjPtr virDomainLoadStatus(virConnectPtr conn,
     }
 
     if (virHashAddEntry(doms->objs, uuidstr, obj) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -5871,14 +5871,14 @@ cleanup:
     return ret;
 }
 
-char *virDomainConfigFile(virConnectPtr conn,
+char *virDomainConfigFile(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                           const char *dir,
                           const char *name)
 {
     char *ret = NULL;
 
     if (virAsprintf(&ret, "%s/%s.xml", dir, name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -6102,7 +6102,7 @@ int virDomainObjListGetInactiveNames(virDomainObjListPtr doms,
     int i;
     virHashForEach(doms->objs, virDomainObjListCopyInactiveNames, &data);
     if (data.oom) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 72f499c..b474b1c 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -219,7 +219,7 @@ virDomainEventCallbackListAdd(virConnectPtr conn,
     }
     /* Allocate new event */
     if (VIR_ALLOC(event) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
     event->conn = conn;
@@ -230,7 +230,7 @@ virDomainEventCallbackListAdd(virConnectPtr conn,
     /* Make space on list */
     n = cbList->count;
     if (VIR_REALLOC_N(cbList->callbacks, n + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         VIR_FREE(event);
         return -1;
     }
@@ -257,7 +257,7 @@ virDomainEventQueuePtr virDomainEventQueueNew(void)
     virDomainEventQueuePtr ret;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -271,14 +271,14 @@ virDomainEventPtr virDomainEventNew(int id, const char *name,
     virDomainEventPtr event;
 
     if (VIR_ALLOC(event) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
     event->type = type;
     event->detail = detail;
     if (!(event->name = strdup(name))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         VIR_FREE(event);
         return NULL;
     }
@@ -379,7 +379,7 @@ virDomainEventQueuePush(virDomainEventQueuePtr evtQueue,
     /* Make space on queue */
     if (VIR_REALLOC_N(evtQueue->events,
                       evtQueue->count + 1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index 510df81..b4d6243 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -326,7 +326,7 @@ virInterfaceDefParseProtoIPv4(virConnectPtr conn, virInterfaceProtocolDefPtr def
         return 0;
 
     if (VIR_ALLOC_N(def->ips, nIpNodes) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -336,7 +336,7 @@ virInterfaceDefParseProtoIPv4(virConnectPtr conn, virInterfaceProtocolDefPtr def
         virInterfaceIpDefPtr ip;
 
         if (VIR_ALLOC(ip) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -385,7 +385,7 @@ virInterfaceDefParseProtoIPv6(virConnectPtr conn, virInterfaceProtocolDefPtr def
         return 0;
 
     if (VIR_ALLOC_N(def->ips, nIpNodes) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -395,7 +395,7 @@ virInterfaceDefParseProtoIPv6(virConnectPtr conn, virInterfaceProtocolDefPtr def
         virInterfaceIpDefPtr ip;
 
         if (VIR_ALLOC(ip) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -432,7 +432,7 @@ virInterfaceDefParseIfAdressing(virConnectPtr conn, virInterfaceDefPtr def,
     }
 
     if (VIR_ALLOC_N(def->protos, nProtoNodes) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -442,7 +442,7 @@ virInterfaceDefParseIfAdressing(virConnectPtr conn, virInterfaceDefPtr def,
         virInterfaceProtocolDefPtr proto;
 
         if (VIR_ALLOC(proto) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -504,7 +504,7 @@ virInterfaceDefParseBridge(virConnectPtr conn, virInterfaceDefPtr def,
     }
     if (nbItf > 0) {
         if (VIR_ALLOC_N(def->data.bridge.itf, nbItf) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             ret = -1;
             goto error;
         }
@@ -545,7 +545,7 @@ virInterfaceDefParseBondItfs(virConnectPtr conn, virInterfaceDefPtr def,
         goto error;
     }
     if (VIR_ALLOC_N(def->data.bond.itf, nbItf) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         ret = -1;
         goto error;
     }
@@ -695,7 +695,7 @@ virInterfaceDefParseXML(virConnectPtr conn,
     VIR_FREE(tmp);
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -844,7 +844,7 @@ virInterfaceDefPtr virInterfaceDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1212,7 +1212,7 @@ virInterfaceDefDevFormat(virConnectPtr conn, virBufferPtr buf,
         goto no_memory;
     return 0;
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 cleanup:
     return -1;
 }
@@ -1319,7 +1319,7 @@ virInterfaceObjPtr virInterfaceAssignDef(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(iface) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     if (virMutexInit(&iface->lock) < 0) {
@@ -1332,7 +1332,7 @@ virInterfaceObjPtr virInterfaceAssignDef(virConnectPtr conn,
     iface->def = def;
 
     if (VIR_REALLOC_N(interfaces->objs, interfaces->count + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         VIR_FREE(iface);
         return NULL;
     }
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index a64adf9..dd42232 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -167,7 +167,7 @@ virNetworkObjPtr virNetworkAssignDef(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(network) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     if (virMutexInit(&network->lock) < 0) {
@@ -180,7 +180,7 @@ virNetworkObjPtr virNetworkAssignDef(virConnectPtr conn,
     network->def = def;
 
     if (VIR_REALLOC_N(nets->objs, nets->count + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         VIR_FREE(network);
         return NULL;
     }
@@ -278,7 +278,7 @@ virNetworkDHCPRangeDefParseXML(virConnectPtr conn,
             if (VIR_REALLOC_N(def->ranges, def->nranges + 1) < 0) {
                 xmlFree(start);
                 xmlFree(end);
-                virReportOOMError(conn);
+                virReportOOMError();
                 return -1;
             }
             def->ranges[def->nranges].start = (char *)start;
@@ -330,7 +330,7 @@ virNetworkDHCPRangeDefParseXML(virConnectPtr conn,
                 VIR_FREE(ip);
                 VIR_FREE(mac);
                 VIR_FREE(name);
-                virReportOOMError(conn);
+                virReportOOMError();
                 return -1;
             }
             def->hosts[def->nhosts].mac = (char *)mac;
@@ -396,7 +396,7 @@ virNetworkDefParseXML(virConnectPtr conn,
     char *tmp;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -463,7 +463,7 @@ virNetworkDefParseXML(virConnectPtr conn,
         netaddr = inet_ntoa(inaddress);
 
         if (virAsprintf(&def->network, "%s/%s", netaddr, def->netmask) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -625,7 +625,7 @@ virNetworkDefPtr virNetworkDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -637,7 +637,7 @@ cleanup:
     return def;
 }
 
-char *virNetworkDefFormat(virConnectPtr conn,
+char *virNetworkDefFormat(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                           const virNetworkDefPtr def)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -729,7 +729,7 @@ char *virNetworkDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     virBufferFreeAndReset(&buf);
     return NULL;
 }
@@ -937,14 +937,14 @@ error:
     return ret;
 }
 
-char *virNetworkConfigFile(virConnectPtr conn,
+char *virNetworkConfigFile(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                            const char *dir,
                            const char *name)
 {
     char *ret = NULL;
 
     if (virAsprintf(&ret, "%s/%s.xml", dir, name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -988,7 +988,7 @@ char *virNetworkAllocateBridge(virConnectPtr conn,
 
         if (!virNetworkBridgeInUse(nets, try, NULL)) {
             if (!(newname = strdup(try))) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 return NULL;
             }
             return newname;
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 4e8a492..2924ff0 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -187,7 +187,7 @@ virNodeDeviceObjPtr virNodeDeviceAssignDef(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(device) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -204,7 +204,7 @@ virNodeDeviceObjPtr virNodeDeviceAssignDef(virConnectPtr conn,
         device->def = NULL;
         virNodeDeviceObjUnlock(device);
         virNodeDeviceObjFree(device);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     devs->objs[devs->count++] = device;
@@ -241,7 +241,7 @@ void virNodeDeviceObjRemove(virNodeDeviceObjListPtr devs,
     }
 }
 
-char *virNodeDeviceDefFormat(virConnectPtr conn,
+char *virNodeDeviceDefFormat(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                              const virNodeDeviceDefPtr def)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -492,7 +492,7 @@ char *virNodeDeviceDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     virBufferFreeAndReset(&buf);
     return NULL;
 }
@@ -1083,7 +1083,7 @@ virNodeDevCapsDefParseXML(virConnectPtr conn,
     int val, ret;
 
     if (VIR_ALLOC(caps) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1157,7 +1157,7 @@ virNodeDeviceDefParseXML(virConnectPtr conn, xmlXPathContextPtr ctxt, int create
     int n, i;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1173,7 +1173,7 @@ virNodeDeviceDefParseXML(virConnectPtr conn, xmlXPathContextPtr ctxt, int create
         def->name = strdup("new device");
 
         if (!def->name) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
     }
@@ -1226,7 +1226,7 @@ virNodeDeviceDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1360,7 +1360,7 @@ virNodeDeviceGetWWNs(virConnectPtr conn,
         VIR_FREE(wwnn);
         VIR_FREE(wwpn);
         ret = -1;
-        virReportOOMError(conn);
+        virReportOOMError();
     }
 
     return ret;
diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c
index 538fa91..4b0068e 100644
--- a/src/conf/secret_conf.c
+++ b/src/conf/secret_conf.c
@@ -120,13 +120,13 @@ secretXMLParseNode(virConnectPtr conn, xmlDocPtr xml, xmlNodePtr root)
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     ctxt->node = root;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -325,7 +325,7 @@ virSecretDefFormat(virConnectPtr conn, const virSecretDefPtr def)
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  error:
     virBufferFreeAndReset(&buf);
     return NULL;
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 62b8394..3e250de 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -431,7 +431,7 @@ virStoragePoolDefParseSource(virConnectPtr conn,
     if (nsource > 0) {
         if (VIR_ALLOC_N(source->devices, nsource) < 0) {
             VIR_FREE(nodeset);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -501,12 +501,12 @@ virStoragePoolDefParseSourceString(virConnectPtr conn,
 
     xpath_ctxt = xmlXPathNewContext(doc);
     if (xpath_ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -612,7 +612,7 @@ virStoragePoolDefParseXML(virConnectPtr conn,
     char *uuid = NULL;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -684,7 +684,7 @@ virStoragePoolDefParseXML(virConnectPtr conn,
             /* source name defaults to pool name */
             ret->source.name = strdup(ret->name);
             if (ret->source.name == NULL) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
         }
@@ -753,7 +753,7 @@ virStoragePoolDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -957,7 +957,7 @@ virStoragePoolDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  cleanup:
     virBufferFreeAndReset(&buf);
     return NULL;
@@ -1046,7 +1046,7 @@ virStorageVolDefParseXML(virConnectPtr conn,
         return NULL;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1161,7 +1161,7 @@ virStorageVolDefParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1353,7 +1353,7 @@ virStorageVolDefFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  cleanup:
     virBufferFreeAndReset(&buf);
     return NULL;
@@ -1456,7 +1456,7 @@ virStoragePoolObjAssignDef(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(pool) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1474,7 +1474,7 @@ virStoragePoolObjAssignDef(virConnectPtr conn,
         pool->def = NULL;
         virStoragePoolObjUnlock(pool);
         virStoragePoolObjFree(pool);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     pools->objs[pools->count++] = pool;
@@ -1510,13 +1510,13 @@ virStoragePoolObjLoad(virConnectPtr conn,
 
     pool->configFile = strdup(path);
     if (pool->configFile == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         virStoragePoolDefFree(def);
         return NULL;
     }
     pool->autostartLink = strdup(autostartLink);
     if (pool->autostartLink == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         virStoragePoolDefFree(def);
         return NULL;
     }
@@ -1609,7 +1609,7 @@ virStoragePoolObjSaveDef(virConnectPtr conn,
             return -1;
         }
         if (!(pool->configFile = strdup(path))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
@@ -1622,7 +1622,7 @@ virStoragePoolObjSaveDef(virConnectPtr conn,
             return -1;
         }
         if (!(pool->autostartLink = strdup(path))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             VIR_FREE(pool->configFile);
             return -1;
         }
@@ -1689,13 +1689,13 @@ virStoragePoolObjDeleteDef(virConnectPtr conn,
 }
 
 virStoragePoolSourcePtr
-virStoragePoolSourceListNewSource(virConnectPtr conn,
+virStoragePoolSourceListNewSource(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                                   virStoragePoolSourceListPtr list)
 {
     virStoragePoolSourcePtr source;
 
     if (VIR_REALLOC_N(list->sources, list->nsources+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1738,7 +1738,7 @@ char *virStoragePoolSourceListFormat(virConnectPtr conn,
     return virBufferContentAndReset(&buf);
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  cleanup:
     virBufferFreeAndReset(&buf);
     return NULL;
diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c
index a329622..eba1f12 100644
--- a/src/conf/storage_encryption_conf.c
+++ b/src/conf/storage_encryption_conf.c
@@ -80,7 +80,7 @@ virStorageEncryptionSecretParse(virConnectPtr conn, xmlXPathContextPtr ctxt,
     char *uuidstr = NULL;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -137,7 +137,7 @@ virStorageEncryptionParseXML(virConnectPtr conn, xmlXPathContextPtr ctxt)
     int format, i, n;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -165,7 +165,7 @@ virStorageEncryptionParseXML(virConnectPtr conn, xmlXPathContextPtr ctxt)
         goto cleanup;
     }
     if (n != 0 && VIR_ALLOC_N(ret->secrets, n) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     ret->nsecrets = n;
@@ -200,7 +200,7 @@ virStorageEncryptionParseNode(virConnectPtr conn,
 
     ctxt = xmlXPathNewContext(xml);
     if (ctxt == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
index 3e46948..5162d95 100644
--- a/src/cpu/cpu.c
+++ b/src/cpu/cpu.c
@@ -77,7 +77,7 @@ cpuCompareXML(virConnectPtr conn,
     doc = xmlParseMemory(xml, strlen(xml));
 
     if (doc == NULL || (ctxt = xmlXPathNewContext(doc)) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/cpu/cpu_generic.c b/src/cpu/cpu_generic.c
index b18c1b4..566fed0 100644
--- a/src/cpu/cpu_generic.c
+++ b/src/cpu/cpu_generic.c
@@ -68,7 +68,7 @@ genericCompare(virCPUDefPtr host,
         return VIR_CPU_COMPARE_INCOMPATIBLE;
 
     if ((hash = genericHashFeatures(host)) == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/cpu/cpu_map.c b/src/cpu/cpu_map.c
index 4731e13..9a80c90 100644
--- a/src/cpu/cpu_map.c
+++ b/src/cpu/cpu_map.c
@@ -124,6 +124,6 @@ cleanup:
     return ret;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     goto cleanup;
 }
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index ce55588..33ce776 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -279,7 +279,7 @@ cleanup:
     return cpu;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 error:
     virCPUDefFree(cpu);
     cpu = NULL;
@@ -396,7 +396,7 @@ out:
     return ret;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     ret = -1;
 
 ignore:
@@ -570,7 +570,7 @@ x86ModelFromCPU(const virCPUDefPtr cpu,
     return model;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 
 error:
     x86ModelFree(model);
@@ -721,7 +721,7 @@ out:
     return ret;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     ret = -1;
 
 ignore:
@@ -758,7 +758,7 @@ x86LoadMap(void)
     struct x86_map *map;
 
     if (VIR_ALLOC(map) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -912,7 +912,7 @@ out:
     return ret;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 
 error:
     ret = VIR_CPU_COMPARE_ERROR;
@@ -1025,7 +1025,7 @@ x86EncodePolicy(const virCPUDefPtr cpu,
         return NULL;
 
     if (!(data = x86DataFromModel(model)))
-        virReportOOMError(NULL);
+        virReportOOMError();
 
     x86ModelFree(model);
 
@@ -1150,7 +1150,7 @@ cpuidSet(uint32_t base, struct cpuX86cpuid **set)
     max = cpuid.eax - base;
 
     if (VIR_ALLOC_N(*set, max + 1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1170,7 +1170,7 @@ x86NodeData(void)
     union cpuData *data;
 
     if (VIR_ALLOC(data) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
diff --git a/src/datatypes.c b/src/datatypes.c
index adc13ad..fa342e0 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -140,7 +140,7 @@ virGetConnect(void) {
     virConnectPtr ret;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failed;
     }
     if (virMutexInit(&ret->lock) < 0) {
@@ -320,13 +320,13 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->magic = VIR_DOMAIN_MAGIC;
@@ -462,13 +462,13 @@ virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->magic = VIR_NETWORK_MAGIC;
@@ -635,19 +635,19 @@ _("Failed to change interface mac address from %s to %s due to differing lengths
     } else {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->mac = strdup(mac);
         if (ret->mac == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -781,13 +781,13 @@ virGetStoragePool(virConnectPtr conn, const char *name, const unsigned char *uui
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->magic = VIR_STORAGE_POOL_MAGIC;
@@ -918,19 +918,19 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name, const c
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->pool = strdup(pool);
         if (ret->pool == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         if (virStrcpyStatic(ret->key, key) == NULL) {
@@ -1066,7 +1066,7 @@ virGetNodeDevice(virConnectPtr conn, const char *name)
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->magic = VIR_NODE_DEVICE_MAGIC;
@@ -1074,7 +1074,7 @@ virGetNodeDevice(virConnectPtr conn, const char *name)
         ret->name = strdup(name);
         if (ret->name == NULL) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -1200,7 +1200,7 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
     if (ret == NULL) {
         if (VIR_ALLOC(ret) < 0) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         ret->magic = VIR_SECRET_MAGIC;
@@ -1209,7 +1209,7 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
         ret->usageType = usageType;
         if (!(ret->usageID = strdup(usageID))) {
             virMutexUnlock(&conn->lock);
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         if (virHashAddEntry(conn->secrets, uuidstr, ret) < 0) {
@@ -1311,7 +1311,7 @@ virStreamPtr virGetStream(virConnectPtr conn) {
     virMutexLock(&conn->lock);
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
     ret->magic = VIR_STREAM_MAGIC;
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index fc5a50e..a03c5f3 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -172,7 +172,7 @@ esxCapsInit(esxPrivate *priv)
     }
 
     if (caps == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -292,7 +292,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
 
     /* Allocate per-connection private data */
     if (VIR_ALLOC(priv) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -341,7 +341,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
 
     if (virAsprintf(&url, "%s://%s:%d/sdk", priv->transport,
                     conn->uri->server, conn->uri->port) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -349,7 +349,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
         username = strdup(conn->uri->user);
 
         if (username == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     } else {
@@ -448,7 +448,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
                     vCenter = strdup(dynamicProperty->val->string);
 
                     if (vCenter == NULL) {
-                        virReportOOMError(NULL);
+                        virReportOOMError();
                         goto failure;
                     }
 
@@ -482,7 +482,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
 
         if (virAsprintf(&url, "%s://%s/sdk", priv->transport,
                         vCenter) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
 
@@ -777,12 +777,12 @@ esxGetHostname(virConnectPtr conn)
         complete = strdup(hostName);
 
         if (complete == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     } else {
         if (virAsprintf(&complete, "%s.%s", hostName, domainName) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -962,7 +962,7 @@ esxGetCapabilities(virConnectPtr conn)
     char *xml = virCapabilitiesFormatXML(priv->caps);
 
     if (xml == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1547,7 +1547,7 @@ esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
     char *osType = strdup("hvm");
 
     if (osType == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2168,7 +2168,7 @@ esxDomainDumpXML(virDomainPtr domain, int flags)
     virBufferURIEncodeString(&buffer, datastoreName);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2322,7 +2322,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
                 names[count] = strdup(dynamicProperty->val->string);
 
                 if (names[count] == NULL) {
-                    virReportOOMError(NULL);
+                    virReportOOMError();
                     goto failure;
                 }
 
@@ -2546,7 +2546,7 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml ATTRIBUTE_UNUSED)
     virBufferURIEncodeString(&buffer, datastoreName);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2555,13 +2555,13 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml ATTRIBUTE_UNUSED)
     if (directoryName != NULL) {
         if (virAsprintf(&datastoreRelatedPath, "[%s] %s/%s.vmx", datastoreName,
                         directoryName, def->name) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     } else {
         if (virAsprintf(&datastoreRelatedPath, "[%s] %s.vmx", datastoreName,
                         def->name) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -2724,7 +2724,7 @@ esxDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED, int *nparams)
     char *type = strdup("allocation");
 
     if (type == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -3012,7 +3012,7 @@ esxDomainMigratePrepare(virConnectPtr dconn,
 
         if (virAsprintf(uri_out, "%s://%s:%d/sdk", transport,
                         dconn->uri->server, dconn->uri->port) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -3071,7 +3071,7 @@ esxDomainMigratePerform(virDomainPtr domain,
     xmlUri = xmlParseURI(uri);
 
     if (xmlUri == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 6dcacd5..5da8e97 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -177,7 +177,7 @@ esxUtil_ParseQuery(xmlURIPtr uri, char **transport, char **vCenter,
             *transport = strdup(queryParam->value);
 
             if (*transport == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
 
@@ -195,7 +195,7 @@ esxUtil_ParseQuery(xmlURIPtr uri, char **transport, char **vCenter,
             *vCenter = strdup(queryParam->value);
 
             if (*vCenter == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
         } else if (STRCASEEQ(queryParam->name, "no_verify")) {
@@ -232,7 +232,7 @@ esxUtil_ParseQuery(xmlURIPtr uri, char **transport, char **vCenter,
         *transport = strdup("https");
 
         if (*transport == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -340,7 +340,7 @@ esxUtil_ParseDatastoreRelatedPath(const char *datastoreRelatedPath,
         *fileName = strdup(separator);
 
         if (*fileName == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     } else {
@@ -452,7 +452,7 @@ esxUtil_GetConfigString(virConfPtr conf, const char *name, char **string,
     *string = strdup(value->str);
 
     if (*string == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 19c85c5..65c2b09 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -376,7 +376,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
     ctx->password = strdup(password);
 
     if (ctx->username == NULL || ctx->password == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -543,7 +543,7 @@ esxVI_Context_DownloadFile(esxVI_Context *ctx, const char *url, char **content)
     }
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -629,7 +629,7 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
     }
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -701,7 +701,7 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
             if (virAsprintf(&xpathExpression,
                             "/soapenv:Envelope/soapenv:Body/vim:%sResponse",
                             methodName) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
 
@@ -1128,7 +1128,7 @@ esxVI_Alloc(void **ptrptr, size_t size)
     }
 
     if (virAllocN(ptrptr, size, 1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1655,7 +1655,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *virtualMachine,
                 *name = strdup(dynamicProperty->val->string);
 
                 if (*name == NULL) {
-                    virReportOOMError(NULL);
+                    virReportOOMError();
                     goto failure;
                 }
 
@@ -2277,7 +2277,7 @@ esxVI_StartVirtualMachineTask(esxVI_Context *ctx, const char *name,
     esxVI_Response *response = NULL;
 
     if (virAsprintf(&methodName, "%s_Task", name) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2328,7 +2328,7 @@ esxVI_StartSimpleVirtualMachineTask
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2383,7 +2383,7 @@ esxVI_SimpleVirtualMachineMethod(esxVI_Context *ctx, const char *name,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2443,7 +2443,7 @@ esxVI_HandleVirtualMachineQuestion
         }
 
         if (virBufferError(&buffer)) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
 
@@ -2532,7 +2532,7 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
     version = strdup("");
 
     if (version == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2602,7 +2602,7 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
         version = strdup(updateSet->version);
 
         if (version == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
 
diff --git a/src/esx/esx_vi_methods.c b/src/esx/esx_vi_methods.c
index 9a1d002..d3beb07 100644
--- a/src/esx/esx_vi_methods.c
+++ b/src/esx/esx_vi_methods.c
@@ -131,7 +131,7 @@ esxVI_Login(esxVI_Context *ctx, const char *userName, const char *password,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -185,7 +185,7 @@ esxVI_Logout(esxVI_Context *ctx)
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -248,7 +248,7 @@ esxVI_SessionIsActive(esxVI_Context *ctx, const char *sessionID,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -312,7 +312,7 @@ esxVI_RetrieveProperties(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -409,7 +409,7 @@ esxVI_MigrateVM_Task(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -463,7 +463,7 @@ esxVI_ReconfigVM_Task(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -528,7 +528,7 @@ esxVI_RegisterVM_Task(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -578,7 +578,7 @@ esxVI_CancelTask(esxVI_Context *ctx, esxVI_ManagedObjectReference *task)
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -628,7 +628,7 @@ esxVI_UnregisterVM(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -681,7 +681,7 @@ esxVI_AnswerVM(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -748,7 +748,7 @@ esxVI_CreateFilter(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -803,7 +803,7 @@ esxVI_DestroyPropertyFilter(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -864,7 +864,7 @@ esxVI_WaitForUpdates(esxVI_Context *ctx, const char *version,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -961,7 +961,7 @@ esxVI_ValidateMigration(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1030,7 +1030,7 @@ esxVI_FindByIp(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1105,7 +1105,7 @@ esxVI_FindByUuid(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1186,7 +1186,7 @@ esxVI_QueryAvailablePerfMetric(esxVI_Context *ctx,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1249,7 +1249,7 @@ esxVI_QueryPerfCounter(esxVI_Context *ctx, esxVI_Int *counterIdList,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1312,7 +1312,7 @@ esxVI_QueryPerf(esxVI_Context *ctx, esxVI_PerfQuerySpec *querySpecList,
     virBufferAddLit(&buffer, ESX_VI__SOAP__REQUEST_FOOTER);
 
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index c561e13..c32bf33 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -622,7 +622,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
         (*anyType)->value = strdup("");
 
         if ((*anyType)->value == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -713,7 +713,7 @@ esxVI_String_AppendValueToList(esxVI_String **stringList, const char *value)
     string->value = strdup(value);
 
     if (string->value == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -799,7 +799,7 @@ esxVI_String_DeepCopyValue(char **dest, const char *src)
     *dest = strdup(src);
 
     if (*dest == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -858,7 +858,7 @@ esxVI_String_Deserialize(xmlNodePtr node, esxVI_String **string)
         (*string)->value = strdup("");
 
         if ((*string)->value == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     }
@@ -888,7 +888,7 @@ esxVI_String_DeserializeValue(xmlNodePtr node, char **value)
         *value = strdup("");
 
         if (*value == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
     }
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index 8a6496d..2651ccb 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -647,7 +647,7 @@ esxVMX_AbsolutePathToDatastoreRelatedPath(esxVI_Context *ctx,
 
     if (virAsprintf(&datastoreRelatedPath, "[%s] %s", datastoreName,
                     directoryAndFileName) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -686,7 +686,7 @@ esxVMX_ParseFileName(esxVI_Context *ctx, const char *fileName,
         src = strdup(fileName);
 
         if (src == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return NULL;
         }
 
@@ -703,7 +703,7 @@ esxVMX_ParseFileName(esxVI_Context *ctx, const char *fileName,
         /* Found single file name referencing a file inside a datastore */
         if (virAsprintf(&src, "[%s] %s/%s", datastoreName, directoryName,
                         fileName) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return NULL;
         }
 
@@ -742,7 +742,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
     }
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -873,7 +873,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
         def->cpumasklen = 0;
 
         if (VIR_ALLOC_N(def->cpumask, VIR_DOMAIN_CPUMASK_LEN) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
 
@@ -939,7 +939,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
     def->os.type = strdup("hvm");
 
     if (def->os.type == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -955,7 +955,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
     }
 
     if (def->os.arch == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -968,7 +968,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
 
     /* def:graphics */
     if (VIR_ALLOC_N(def->graphics, 1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -984,7 +984,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
 
     /* def:disks: 4 * 15 scsi + 2 * 2 ide + 2 floppy = 66 */
     if (VIR_ALLOC_N(def->disks, 66) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1084,7 +1084,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
 
     /* def:nets */
     if (VIR_ALLOC_N(def->nets, 4) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1112,7 +1112,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
 
     /* def:serials */
     if (VIR_ALLOC_N(def->serials, 4) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1132,7 +1132,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
 
     /* def:parallels */
     if (VIR_ALLOC_N(def->parallels, 3) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1188,7 +1188,7 @@ esxVMX_ParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def)
     }
 
     if (VIR_ALLOC(*def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1356,7 +1356,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
     }
 
     if (VIR_ALLOC(*def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1381,7 +1381,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
             }
 
             if (virAsprintf(&prefix, "scsi%d:%d", controller, id) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
 
@@ -1397,7 +1397,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
                 (*def)->driverName = strdup(virtualDev);
 
                 if ((*def)->driverName == NULL) {
-                    virReportOOMError(NULL);
+                    virReportOOMError();
                     goto failure;
                 }
             }
@@ -1416,7 +1416,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
             }
 
             if (virAsprintf(&prefix, "ide%d:%d", controller, id) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
 
@@ -1442,7 +1442,7 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
             }
 
             if (virAsprintf(&prefix, "floppy%d", controller) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
 
@@ -1715,7 +1715,7 @@ esxVMX_ParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
     }
 
     if (VIR_ALLOC(*def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -1909,7 +1909,7 @@ esxVMX_ParseSerial(esxVI_Context *ctx, virConfPtr conf, int port,
     }
 
     if (VIR_ALLOC(*def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2032,7 +2032,7 @@ esxVMX_ParseParallel(esxVI_Context *ctx, virConfPtr conf, int port,
     }
 
     if (VIR_ALLOC(*def) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
@@ -2135,13 +2135,13 @@ esxVMX_FormatFileName(esxVI_Context *ctx ATTRIBUTE_UNUSED, const char *src)
         if (directoryName == NULL) {
             if (virAsprintf(&absolutePath, "/vmfs/volumes/%s/%s",
                             datastoreName, fileName) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
         } else {
             if (virAsprintf(&absolutePath, "/vmfs/volumes/%s/%s/%s",
                             datastoreName, directoryName, fileName) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto failure;
             }
         }
@@ -2150,7 +2150,7 @@ esxVMX_FormatFileName(esxVI_Context *ctx ATTRIBUTE_UNUSED, const char *src)
         absolutePath = strdup(src);
 
         if (absolutePath == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto failure;
         }
     } else {
@@ -2421,7 +2421,7 @@ esxVMX_FormatConfig(esxVI_Context *ctx, virDomainDefPtr def,
 
     /* Get final VMX output */
     if (virBufferError(&buffer)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failure;
     }
 
diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index 7fea057..bccb167 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/netcf_driver.c
@@ -120,7 +120,7 @@ static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn,
 
     if (VIR_ALLOC(driverState) < 0)
     {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto alloc_error;
     }
 
diff --git a/src/libvirt.c b/src/libvirt.c
index 8a9ee20..2e247dd 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1646,7 +1646,7 @@ virConnectGetURI (virConnectPtr conn)
 
     name = (char *)xmlSaveUri(conn->uri);
     if (!name) {
-        virReportOOMError (conn);
+        virReportOOMError();
         goto error;
     }
     return name;
@@ -10250,7 +10250,7 @@ int virStreamSendAll(virStreamPtr stream,
     }
 
     if (VIR_ALLOC_N(bytes, want) < 0) {
-        virReportOOMError(stream->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -10348,7 +10348,7 @@ int virStreamRecvAll(virStreamPtr stream,
 
 
     if (VIR_ALLOC_N(bytes, want) < 0) {
-        virReportOOMError(stream->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index bc81543..8d7f69e 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -132,6 +132,6 @@ done:
     return 0;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     return -1;
 }
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 02242c7..2f07db1 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -314,7 +314,7 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
     }
 
     if (virAsprintf(&oldroot, "%s/.oldroot", root->src) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto err;
     }
 
@@ -336,7 +336,7 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
 
     /* Create a directory called 'new' in tmpfs */
     if (virAsprintf(&newroot, "%s/new", oldroot) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto err;
     }
 
@@ -403,7 +403,7 @@ static int lxcContainerMountBasicFS(virDomainFSDefPtr root)
     char *devpts;
 
     if (virAsprintf(&devpts, "/.oldroot%s/dev/pts", root->src) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return rc;
     }
 
@@ -507,7 +507,7 @@ static int lxcContainerMountNewFS(virDomainDefPtr vmDef)
             continue;
 
         if (virAsprintf(&src, "/.oldroot/%s", vmDef->fss[i]->src) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
 
@@ -553,12 +553,12 @@ static int lxcContainerUnmountOldFS(void)
 
         if (VIR_REALLOC_N(mounts, nmounts+1) < 0) {
             endmntent(procmnt);
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
         if (!(mounts[nmounts++] = strdup(mntent.mnt_dir))) {
             endmntent(procmnt);
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
     }
@@ -738,12 +738,12 @@ static int lxcContainerChild( void *data )
 
     if (root) {
         if (virAsprintf(&ttyPath, "%s%s", root->src, argv->ttyPath) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
     } else {
         if (!(ttyPath = strdup(argv->ttyPath))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
     }
@@ -815,7 +815,7 @@ int lxcContainerStart(virDomainDefPtr def,
 
     /* allocate a stack for the container */
     if (VIR_ALLOC_N(stack, stacksize) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     stacktop = stack + stacksize;
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 6304815..7fd9a1b 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -159,7 +159,7 @@ static char*lxcMonitorPath(virDomainDefPtr def)
 
     if (virAsprintf(&sockpath, "%s/%s.sock",
                     LXC_STATE_DIR, def->name) < 0)
-        virReportOOMError(NULL);
+        virReportOOMError();
     return sockpath;
 }
 
@@ -552,7 +552,7 @@ lxcControllerRun(virDomainDefPtr def,
 
         if (virAsprintf(&devpts, "%s/dev/pts", root->src) < 0 ||
             virAsprintf(&devptmx, "%s/dev/pts/ptmx", root->src) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -683,18 +683,18 @@ int main(int argc, char *argv[])
 
         case 'n':
             if ((name = strdup(optarg)) == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto cleanup;
             }
             break;
 
         case 'v':
             if (VIR_REALLOC_N(veths, nveths+1) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto cleanup;
             }
             if ((veths[nveths++] = strdup(optarg)) == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto cleanup;
             }
             break;
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index d78f7f7..858b7d4 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -113,7 +113,7 @@ static virDrvOpenStatus lxcOpen(virConnectPtr conn,
 
         conn->uri = xmlParseURI("lxc:///");
         if (!conn->uri) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
@@ -179,7 +179,7 @@ static char *lxcGetCapabilities(virConnectPtr conn) {
 
     lxcDriverLock(driver);
     if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
     lxcDriverUnlock(driver);
 
     return xml;
@@ -536,7 +536,7 @@ static char *lxcGetOSType(virDomainPtr dom)
     ret = strdup(vm->def->os.type);
 
     if (ret == NULL)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     if (vm)
@@ -820,17 +820,17 @@ static int lxcSetupInterfaces(virConnectPtr conn,
             def->nets[i]->ifname = strdup(parentVeth);
         }
         if (VIR_REALLOC_N(*veths, (*nveths)+1) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error_exit;
         }
         if (((*veths)[(*nveths)] = strdup(containerVeth)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error_exit;
         }
         (*nveths)++;
 
         if (NULL == def->nets[i]->ifname) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error_exit;
         }
 
@@ -879,7 +879,7 @@ static int lxcMonitorClient(virConnectPtr conn,
 
     if (virAsprintf(&sockpath, "%s/%s.sock",
                     driver->stateDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -1153,7 +1153,7 @@ static int lxcControllerStart(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 cleanup:
     if (largv) {
         for (i = 0 ; i < largc ; i++)
@@ -1202,7 +1202,7 @@ static int lxcVmStart(virConnectPtr conn,
 
     if (virAsprintf(&logfile, "%s/%s.log",
                     driver->logDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -1890,7 +1890,8 @@ static int lxcVersion(virConnectPtr conn, unsigned long *version)
     return 0;
 }
 
-static char *lxcGetSchedulerType(virDomainPtr domain, int *nparams)
+static char *lxcGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
+                                 int *nparams)
 {
     char *schedulerType = NULL;
 
@@ -1900,7 +1901,7 @@ static char *lxcGetSchedulerType(virDomainPtr domain, int *nparams)
     schedulerType = strdup("posix");
 
     if (schedulerType == NULL)
-        virReportOOMError(domain->conn);
+        virReportOOMError();
 
     return schedulerType;
 }
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 08e5ee6..27678d0 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -152,7 +152,7 @@ networkFindActiveConfigs(struct network_driver *driver) {
                 char *pidpath;
 
                 if (virAsprintf(&pidpath, "/proc/%d/exe", obj->dnsmasqPid) < 0) {
-                    virReportOOMError(NULL);
+                    virReportOOMError();
                     goto cleanup;
                 }
                 if (virFileLinkPointsTo(pidpath, DNSMASQ) == 0)
@@ -267,7 +267,7 @@ networkStartup(int privileged) {
     return 0;
 
 out_of_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 
 error:
     if (driverState)
@@ -362,8 +362,7 @@ networkShutdown(void) {
 
 
 static int
-networkBuildDnsmasqArgv(virConnectPtr conn,
-                        virNetworkObjPtr network,
+networkBuildDnsmasqArgv(virNetworkObjPtr network,
                         const char *pidfile,
                         const char ***argv) {
     int i, len, r;
@@ -518,7 +517,7 @@ networkBuildDnsmasqArgv(virConnectPtr conn,
             VIR_FREE((*argv)[i]);
         VIR_FREE(*argv);
     }
-    virReportOOMError(conn);
+    virReportOOMError();
     return -1;
 }
 
@@ -553,12 +552,12 @@ dhcpStartDhcpDaemon(virConnectPtr conn,
     }
 
     if (!(pidfile = virFilePid(NETWORK_PID_DIR, network->def->name))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
     argv = NULL;
-    if (networkBuildDnsmasqArgv(conn, network, pidfile, &argv) < 0) {
+    if (networkBuildDnsmasqArgv(network, pidfile, &argv) < 0) {
         VIR_FREE(pidfile);
         return -1;
     }
@@ -844,7 +843,7 @@ static int networkDisableIPV6(virConnectPtr conn,
     int ret = -1;
 
     if (virAsprintf(&field, SYSCTL_PATH "/net/ipv6/conf/%s/disable_ipv6", network->def->bridge) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -862,7 +861,7 @@ static int networkDisableIPV6(virConnectPtr conn,
     VIR_FREE(field);
 
     if (virAsprintf(&field, SYSCTL_PATH "/net/ipv6/conf/%s/accept_ra", network->def->bridge) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -874,7 +873,7 @@ static int networkDisableIPV6(virConnectPtr conn,
     VIR_FREE(field);
 
     if (virAsprintf(&field, SYSCTL_PATH "/net/ipv6/conf/%s/autoconf", network->def->bridge) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1131,7 +1130,7 @@ static int networkListNetworks(virConnectPtr conn, char **const names, int nname
         if (virNetworkObjIsActive(driver->networks.objs[i])) {
             if (!(names[got] = strdup(driver->networks.objs[i]->def->name))) {
                 virNetworkObjUnlock(driver->networks.objs[i]);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             got++;
@@ -1175,7 +1174,7 @@ static int networkListDefinedNetworks(virConnectPtr conn, char **const names, in
         if (!virNetworkObjIsActive(driver->networks.objs[i])) {
             if (!(names[got] = strdup(driver->networks.objs[i]->def->name))) {
                 virNetworkObjUnlock(driver->networks.objs[i]);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             got++;
@@ -1456,7 +1455,7 @@ static char *networkGetBridgeName(virNetworkPtr net) {
 
     bridge = strdup(network->def->bridge);
     if (!bridge)
-        virReportOOMError(net->conn);
+        virReportOOMError();
 
 cleanup:
     if (network)
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index fbadfca..74258be 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -85,7 +85,7 @@ static int update_driver_name(virConnectPtr conn,
     VIR_FREE(dev->def->driver);
 
     if (virAsprintf(&driver_link, "%s/driver", dev->def->sysfs_path) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -106,7 +106,7 @@ static int update_driver_name(virConnectPtr conn,
     if (p) {
         dev->def->driver = strdup(p+1);
         if (!dev->def->driver) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -174,7 +174,7 @@ nodeListDevices(virConnectPtr conn,
             virNodeDeviceHasCap(driver->devs.objs[i], cap)) {
             if ((names[ndevs++] = strdup(driver->devs.objs[i]->def->name)) == NULL) {
                 virNodeDeviceObjUnlock(driver->devs.objs[i]);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto failure;
             }
         }
@@ -314,7 +314,7 @@ static char *nodeDeviceGetParent(virNodeDevicePtr dev)
     if (obj->def->parent) {
         ret = strdup(obj->def->parent);
         if (!ret)
-            virReportOOMError(dev->conn);
+            virReportOOMError();
     } else {
         virNodeDeviceReportError(dev->conn, VIR_ERR_INTERNAL_ERROR,
                                  "%s", _("no parent for this device"));
@@ -380,7 +380,7 @@ nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames)
     for (caps = obj->def->caps; caps && ncaps < maxnames; caps = caps->next) {
         names[ncaps] = strdup(virNodeDevCapTypeToString(caps->type));
         if (names[ncaps++] == NULL) {
-            virReportOOMError(dev->conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -430,7 +430,7 @@ nodeDeviceVportCreateDelete(virConnectPtr conn,
                     parent_host,
                     operation_file) < 0) {
 
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto cleanup;
     }
@@ -442,7 +442,7 @@ nodeDeviceVportCreateDelete(virConnectPtr conn,
                     wwpn,
                     wwnn) < 0) {
 
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto cleanup;
     }
@@ -618,7 +618,7 @@ nodeDeviceDestroy(virNodeDevicePtr dev)
     obj = NULL;
 
     if (parent_name == NULL) {
-        virReportOOMError(dev->conn);
+        virReportOOMError();
         goto out;
     }
 
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
index c1fce5d..e11fb2e 100644
--- a/src/node_device/node_device_linux_sysfs.c
+++ b/src/node_device/node_device_linux_sysfs.c
@@ -46,7 +46,7 @@ static int open_wwn_file(const char *prefix,
     char *wwn_path = NULL;
 
     if (virAsprintf(&wwn_path, "%s/host%d/%s", prefix, host, file) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
@@ -93,7 +93,7 @@ int read_wwn_linux(int host, const char *file, char **wwn)
 
     *wwn = strndup(p, sizeof(buf));
     if (*wwn == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
@@ -122,7 +122,7 @@ int check_fc_host_linux(union _virNodeDevCapData *d)
     if (virAsprintf(&sysfs_path, "%s/host%d",
                     LINUX_SYSFS_FC_HOST_PREFIX,
                     d->scsi_host.host) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
@@ -170,7 +170,7 @@ int check_vport_capable_linux(union _virNodeDevCapData *d)
     if (virAsprintf(&sysfs_path, "%s/host%d/vport_create",
                     LINUX_SYSFS_FC_HOST_PREFIX,
                     d->scsi_host.host) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
@@ -305,7 +305,7 @@ int get_physical_function_linux(const char *sysfs_path,
               "with sysfs path '%s'\n", sysfs_path);
 
     if (virBuildPath(&device_link, sysfs_path, "physfn") == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
     } else {
         ret = get_sriov_function(device_link, &d->pci_dev.physical_function);
         if (ret == SRIOV_FOUND) {
@@ -340,14 +340,14 @@ int get_virtual_functions_linux(const char *sysfs_path,
             unsigned int *num_funcs = &d->pci_dev.num_virtual_functions;
 
             if (virBuildPath(&device_link, sysfs_path, entry->d_name) == -1) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto out;
             }
 
             VIR_DEBUG("Number of virtual functions: %d", *num_funcs);
             if (VIR_REALLOC_N(d->pci_dev.virtual_functions,
                               (*num_funcs) + 1) != 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto out;
             }
 
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index be765c4..76f83bf 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -125,7 +125,7 @@ static int udevGetDeviceProperty(struct udev_device *udev_device,
         VIR_ERROR("Failed to allocate memory for property value for "
                   "property key '%s' on device with sysname '%s'",
                   property_key, udev_device_get_sysname(udev_device));
-        virReportOOMError(NULL);
+        virReportOOMError();
         ret = PROPERTY_ERROR;
         goto out;
     }
@@ -214,7 +214,7 @@ static int udevGetDeviceSysfsAttr(struct udev_device *udev_device,
         VIR_ERROR("Failed to allocate memory for sysfs attribute value for "
                   "sysfs attribute '%s' on device with sysname '%s'",
                   attr_name, udev_device_get_sysname(udev_device));
-        virReportOOMError(NULL);
+        virReportOOMError();
         ret = PROPERTY_ERROR;
         goto out;
     }
@@ -390,7 +390,7 @@ static int udevTranslatePCIIds(unsigned int vendor,
     if (vendor_name != NULL) {
         *vendor_string = strdup(vendor_name);
         if (*vendor_string == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto out;
         }
     }
@@ -398,7 +398,7 @@ static int udevTranslatePCIIds(unsigned int vendor,
     if (device_name != NULL) {
         *product_string = strdup(device_name);
         if (*product_string == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto out;
         }
     }
@@ -678,7 +678,7 @@ static int udevProcessSCSITarget(struct udev_device *device ATTRIBUTE_UNUSED,
 
     data->scsi_target.name = strdup(sysname);
     if (data->scsi_target.name == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -737,7 +737,7 @@ static int udevGetSCSIType(unsigned int type, char **typestring)
     if (*typestring == NULL) {
         if (foundtype == 1) {
             ret = -1;
-            virReportOOMError(NULL);
+            virReportOOMError();
         } else {
             VIR_ERROR("Failed to find SCSI device type %d", type);
         }
@@ -819,7 +819,7 @@ static int udevProcessDisk(struct udev_device *device,
 
     data->storage.drive_type = strdup("disk");
     if (data->storage.drive_type == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         ret = -1;
         goto out;
     }
@@ -906,7 +906,7 @@ static int udevProcessCDROM(struct udev_device *device,
     VIR_FREE(def->caps->data.storage.drive_type);
     def->caps->data.storage.drive_type = strdup("cdrom");
     if (def->caps->data.storage.drive_type == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1232,7 +1232,7 @@ static int udevSetParent(struct udev_device *device,
 
     def->parent_sysfs_path = strdup(parent_sysfs_path);
     if (def->parent_sysfs_path == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1245,7 +1245,7 @@ static int udevSetParent(struct udev_device *device,
     }
 
     if (def->parent == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1263,7 +1263,7 @@ static int udevAddOneDevice(struct udev_device *device)
     int ret = -1;
 
     if (VIR_ALLOC(def) != 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1275,7 +1275,7 @@ static int udevAddOneDevice(struct udev_device *device)
     }
 
     if (VIR_ALLOC(def->caps) != 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1453,18 +1453,18 @@ static int udevSetupSystemDev(void)
     int ret = -1;
 
     if (VIR_ALLOC(def) != 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
     def->name = strdup("computer");
     if (def->name == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
     if (VIR_ALLOC(def->caps) != 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto out;
     }
 
@@ -1556,7 +1556,7 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
     int ret = 0;
 
     if (VIR_ALLOC(priv) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         ret = -1;
         goto out;
     }
@@ -1564,7 +1564,7 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
     priv->watch = -1;
 
     if (VIR_ALLOC(driverState) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         VIR_FREE(priv);
         ret = -1;
         goto out;
diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c
index 2ed330b..a2f7073 100644
--- a/src/opennebula/one_conf.c
+++ b/src/opennebula/one_conf.c
@@ -142,7 +142,7 @@ int oneSubmitVM(virConnectPtr    conn,
     char* templ;
     int   oneid;
 
-    if ((templ = xmlOneTemplate(conn,vm->def)) == NULL)
+    if ((templ = xmlOneTemplate(vm->def)) == NULL)
         return -1;
 
     if ((oneid = c_oneAllocateTemplate(templ)) < 0) {
@@ -166,7 +166,7 @@ int oneSubmitVM(virConnectPtr    conn,
  * @return OpenNebula VM template.
  */
 
-char* xmlOneTemplate(virConnectPtr conn,virDomainDefPtr def)
+char* xmlOneTemplate(virDomainDefPtr def)
 {
     int i;
     virBuffer buf= VIR_BUFFER_INITIALIZER;
@@ -277,7 +277,7 @@ char* xmlOneTemplate(virConnectPtr conn,virDomainDefPtr def)
     return virBufferContentAndReset(&buf);
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     virBufferFreeAndReset(&buf);
     return NULL;
 };
diff --git a/src/opennebula/one_conf.h b/src/opennebula/one_conf.h
index de865cb..bb01026 100644
--- a/src/opennebula/one_conf.h
+++ b/src/opennebula/one_conf.h
@@ -43,7 +43,7 @@ virCapsPtr oneCapsInit(void);
 
 int oneSubmitVM(virConnectPtr conn ,one_driver_t* driver, virDomainObjPtr  vm);
 
-char* xmlOneTemplate(virConnectPtr conn,virDomainDefPtr def);
+char* xmlOneTemplate(virDomainDefPtr def);
 
 #define oneError(conn, dom, code, fmt...)                               \
     virReportErrorHelper(conn, VIR_FROM_ONE, code, __FILE__,            \
diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c
index c96d24d..8c8985a 100644
--- a/src/opennebula/one_driver.c
+++ b/src/opennebula/one_driver.c
@@ -69,7 +69,7 @@ static virDrvOpenStatus oneOpen(virConnectPtr conn,
     if (conn->uri == NULL) {
         conn->uri = xmlParseURI("one:///");
         if (!conn->uri) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else if (conn->uri->scheme == NULL ||
@@ -392,7 +392,7 @@ static char *oneGetOSType(virDomainPtr dom)
 
     ret = strdup(vm->def->os.type);
     if (!ret)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     if (vm)
@@ -641,7 +641,7 @@ static int oneStartup(int privileged ATTRIBUTE_UNUSED){
 
     one_driver->nextid=1;
     if ((one_driver->caps = oneCapsInit()) == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
     oneDriverUnlock(one_driver);
@@ -702,7 +702,7 @@ static char*  oneGetCapabilities(virConnectPtr conn){
     char *xml;
     oneDriverLock(privconn);
     if ((xml = virCapabilitiesFormatXML(privconn->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
     oneDriverUnlock(privconn);
     return xml;
 }
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 43bbaf2..6baaea2 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -315,7 +315,7 @@ openvzReadNetworkConf(virConnectPtr conn,
 
     return 0;
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainNetDefFree(net);
     return -1;
@@ -411,7 +411,7 @@ openvzReadFSConf(virConnectPtr conn,
 
     return 0;
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainFSDefFree(fs);
     return -1;
@@ -531,7 +531,7 @@ int openvzLoadDomains(struct openvz_driver *driver) {
     return 0;
 
  no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 
  cleanup:
     fclose(fp);
@@ -559,7 +559,7 @@ openvzWriteConfigParam(const char * conf_file, const char *param, const char *va
     char line[PATH_MAX] ;
 
     if (virAsprintf(&temp_file, "%s.tmp", conf_file)<0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -747,7 +747,7 @@ openvzCopyDefaultConfig(int vpsid)
         goto cleanup;
 
     if (virAsprintf(&default_conf_file, "%s/ve-%s.conf-sample", confdir, configfile_value) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 196fd8c..49a7bd2 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -321,7 +321,7 @@ static char *openvzGetOSType(virDomainPtr dom)
     }
 
     if (!(ret = strdup(vm->def->os.type)))
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     if (vm)
@@ -812,7 +812,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
 
     if (vmdef->os.init == NULL) {
         if (!(vmdef->os.init = strdup("/sbin/init"))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -892,7 +892,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
 
     if (vmdef->os.init == NULL) {
         if (!(vmdef->os.init = strdup("/sbin/init"))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -1192,7 +1192,7 @@ static virDrvOpenStatus openvzOpen(virConnectPtr conn,
 
         conn->uri = xmlParseURI("openvz:///system");
         if (conn->uri == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
@@ -1231,7 +1231,7 @@ static virDrvOpenStatus openvzOpen(virConnectPtr conn,
      * here, don't return DECLINED, always use ERROR */
 
     if (VIR_ALLOC(driver) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
 
@@ -1372,7 +1372,7 @@ static int openvzListDefinedDomains(virConnectPtr conn,
     return got;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for ( ; got >= 0 ; got--)
         VIR_FREE(names[got]);
     return -1;
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index bd5cfc7..80ed4b9 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -108,24 +108,24 @@ phypOpen(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(phyp_driver) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
     if (VIR_ALLOC(uuid_table) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
     if (VIR_ALLOC(connection_data) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
     len = strlen(conn->uri->path) + 1;
 
     if (VIR_ALLOC_N(string, len) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
@@ -136,7 +136,7 @@ phypOpen(virConnectPtr conn,
         managed_system = strdup(conn->uri->path);
 
     if (!managed_system) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
@@ -169,7 +169,7 @@ phypOpen(virConnectPtr conn,
     phyp_driver->managed_system = managed_system;
     phyp_driver->uuid_table = uuid_table;
     if ((phyp_driver->caps = phypCapsInit()) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failure;
     }
 
@@ -260,12 +260,12 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
         goto err;
 
     if (virAsprintf(&pubkey, "%s/.ssh/id_rsa.pub", userhome) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
     if (virAsprintf(&pvtkey, "%s/.ssh/id_rsa", userhome) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -492,7 +492,7 @@ phypExec(LIBSSH2_SESSION * session, char *cmd, int *exit_status,
   exit:
     if (virBufferError(&tex_ret)) {
         virBufferFreeAndReset(&tex_ret);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     return virBufferContentAndReset(&tex_ret);
@@ -512,7 +512,7 @@ phypGetLparID(LIBSSH2_SESSION * session, const char *managed_system,
     if (virAsprintf(&cmd,
                     "lssyscfg -r lpar -m %s --filter lpar_names=%s -F lpar_id",
                     managed_system, name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -546,7 +546,7 @@ phypGetLparNAME(LIBSSH2_SESSION * session, const char *managed_system,
     if (virAsprintf(&cmd,
                     "lssyscfg -r lpar -m %s --filter lpar_ids=%d -F name",
                     managed_system, lpar_id) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -619,7 +619,7 @@ phypGetLparMem(virConnectPtr conn, const char *managed_system, int lpar_id,
                         "lshwres -m %s -r mem --level lpar -F curr_mem "
                         "--filter lpar_ids=%d",
                         managed_system, lpar_id) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
     } else {
@@ -627,7 +627,7 @@ phypGetLparMem(virConnectPtr conn, const char *managed_system, int lpar_id,
                         "lshwres -m %s -r mem --level lpar -F "
                         "curr_max_mem --filter lpar_ids=%d",
                         managed_system, lpar_id) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
     }
@@ -688,7 +688,7 @@ phypGetLparCPUGeneric(virConnectPtr conn, const char *managed_system,
                         "lshwres -m %s -r proc --level lpar -F "
                         "curr_max_procs --filter lpar_ids=%d",
                         managed_system, lpar_id) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
     } else {
@@ -696,7 +696,7 @@ phypGetLparCPUGeneric(virConnectPtr conn, const char *managed_system,
                         "lshwres -m %s -r proc --level lpar -F "
                         "curr_procs --filter lpar_ids=%d",
                         managed_system, lpar_id) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
     }
@@ -739,7 +739,7 @@ phypGetRemoteSlot(virConnectPtr conn, const char *managed_system,
                     "lshwres -m %s -r virtualio --rsubtype scsi -F "
                     "remote_slot_num --filter lpar_names=%s",
                     managed_system, lpar_name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
     ret = phypExec(session, cmd, &exit_status, conn);
@@ -786,7 +786,7 @@ phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
                     "lshwres -m %s -r virtualio --rsubtype scsi -F "
                     "backing_devices --filter slots=%d",
                     managed_system, remote_slot) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -814,7 +814,7 @@ phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
         backing_device = strdup(char_ptr);
 
         if (backing_device == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
     } else {
@@ -854,7 +854,7 @@ phypGetLparState(virConnectPtr conn, unsigned int lpar_id)
     if (virAsprintf(&cmd,
                     "lssyscfg -r lpar -m %s -F state --filter lpar_ids=%d",
                     managed_system, lpar_id) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -897,7 +897,7 @@ phypGetVIOSPartitionID(virConnectPtr conn)
     if (virAsprintf(&cmd,
                     "lssyscfg -m %s -r lpar -F lpar_id,lpar_env|grep "
                     "vioserver|sed -s 's/,.*$//g'", managed_system) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -937,7 +937,7 @@ phypDiskType(virConnectPtr conn, char *backing_device)
                     "viosvrcmd -m %s -p %d -c \"lssp -field name type "
                     "-fmt , -all|grep %s|sed -e 's/^.*,//g'\"",
                     managed_system, vios_id, backing_device) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -994,7 +994,7 @@ phypNumDomainsGeneric(virConnectPtr conn, unsigned int type)
     if (virAsprintf(&cmd,
                     "lssyscfg -r lpar -m %s -F lpar_id,state %s |grep -c "
                     "^[0-9]*", managed_system, state) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1063,7 +1063,7 @@ phypListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
         (&cmd,
          "lssyscfg -r lpar -m %s -F lpar_id,state %s | sed -e 's/,.*$//g'",
          managed_system, state) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
     ret = phypExec(session, cmd, &exit_status, conn);
@@ -1126,7 +1126,7 @@ phypListDefinedDomains(virConnectPtr conn, char **const names, int nnames)
         (&cmd,
          "lssyscfg -r lpar -m %s -F name,state | grep \"Not Activated\" | "
          "sed -e 's/,.*$//g'", managed_system) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1144,7 +1144,7 @@ phypListDefinedDomains(virConnectPtr conn, char **const names, int nnames)
             if (char_ptr2) {
                 *char_ptr2 = '\0';
                 if ((names[got++] = strdup(domains)) == NULL) {
-                    virReportOOMError(conn);
+                    virReportOOMError();
                     goto err;
                 }
                 char_ptr2++;
@@ -1291,7 +1291,7 @@ phypDomainResume(virDomainPtr dom)
         (&cmd,
          "chsysstate -m %s -r lpar -o on --id %d -f %s",
          managed_system, dom->id, dom->name) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1325,7 +1325,7 @@ phypDomainShutdown(virDomainPtr dom)
         (&cmd,
          "chsysstate -m %s -r lpar -o shutdown --id %d",
          managed_system, dom->id) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1381,7 +1381,7 @@ phypDomainDestroy(virDomainPtr dom)
     if (virAsprintf
         (&cmd,
          "rmsyscfg -m %s -r lpar --id %d", managed_system, dom->id) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1463,7 +1463,7 @@ phypConnectGetCapabilities(virConnectPtr conn)
     char *xml;
 
     if ((xml = virCapabilitiesFormatXML(phyp_driver->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return xml;
 }
@@ -1550,7 +1550,7 @@ phypDomainSetCPU(virDomainPtr dom, unsigned int nvcpus)
          "chhwres -r proc -m %s --id %d -o %c --procunits %d 2>&1 |sed"
          "-e 's/^.*\\([0-9]\\+.[0-9]\\+\\).*$/\\1/g'",
          managed_system, dom->id, operation, amount) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1671,7 +1671,7 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
          managed_system, def->name, (int) def->memory,
          (int) def->memory, (int) def->maxmem, (int) def->vcpus,
          def->disks[0]->src) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1734,12 +1734,12 @@ phypUUIDTable_AddLpar(virConnectPtr conn, unsigned char *uuid, int id)
     i--;
 
     if (VIR_REALLOC_N(uuid_table->lpars, uuid_table->nlpars) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
     if (VIR_ALLOC(uuid_table->lpars[i]) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1781,7 +1781,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
             rc = read(fd, &id, sizeof(int));
             if (rc == sizeof(int)) {
                 if (VIR_ALLOC(uuid_table->lpars[i]) < 0) {
-                    virReportOOMError(conn);
+                    virReportOOMError();
                     goto err;
                 }
                 uuid_table->lpars[i]->id = id;
@@ -1799,7 +1799,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
             }
         }
     } else
-        virReportOOMError(conn);
+        virReportOOMError();
 
     close(fd);
     return 0;
@@ -1861,7 +1861,7 @@ phypUUIDTable_Init(virConnectPtr conn)
         return 0;
 
     if (VIR_ALLOC_N(ids, nids) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -1891,7 +1891,7 @@ phypUUIDTable_Init(virConnectPtr conn)
         if (VIR_ALLOC_N(uuid_table->lpars, uuid_table->nlpars) >= 0) {
             for (i = 0; i < uuid_table->nlpars; i++) {
                 if (VIR_ALLOC(uuid_table->lpars[i]) < 0) {
-                    virReportOOMError(conn);
+                    virReportOOMError();
                     goto err;
                 }
                 uuid_table->lpars[i]->id = ids[i];
@@ -1901,7 +1901,7 @@ phypUUIDTable_Init(virConnectPtr conn)
                              ids[i]);
             }
         } else {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto err;
         }
 
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 3d83a8f..0ce5790 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -104,11 +104,11 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     driver->dynamicOwnership = 1;
 
     if (!(driver->vncListen = strdup("127.0.0.1"))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     if (!(driver->vncTLSx509certdir = strdup(SYSCONF_DIR "/pki/libvirt-vnc"))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -157,7 +157,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     if (p && p->str) {
         VIR_FREE(driver->vncTLSx509certdir);
         if (!(driver->vncTLSx509certdir = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -168,7 +168,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     if (p && p->str) {
         VIR_FREE(driver->vncListen);
         if (!(driver->vncListen = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -179,7 +179,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     if (p && p->str) {
         VIR_FREE(driver->vncPassword);
         if (!(driver->vncPassword = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -189,7 +189,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     CHECK_TYPE ("security_driver", VIR_CONF_STRING);
     if (p && p->str) {
         if (!(driver->securityDriverName = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -204,7 +204,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     if (p && p->str) {
         VIR_FREE(driver->vncSASLdir);
         if (!(driver->vncSASLdir = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -213,7 +213,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     p = virConfGetValue (conf, "user");
     CHECK_TYPE ("user", VIR_CONF_STRING);
     if (!(user = strdup(p && p->str ? p->str : QEMU_USER))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         virConfFree(conf);
         return -1;
     }
@@ -228,7 +228,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     p = virConfGetValue (conf, "group");
     CHECK_TYPE ("group", VIR_CONF_STRING);
     if (!(group = strdup(p && p->str ? p->str : QEMU_GROUP))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         virConfFree(conf);
         return -1;
     }
@@ -284,7 +284,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
         for (pp = p->list; pp; pp = pp->next)
             len++;
         if (VIR_ALLOC_N(driver->cgroupDeviceACL, 1+len) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -296,7 +296,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
             }
             driver->cgroupDeviceACL[i] = strdup (pp->str);
             if (driver->cgroupDeviceACL[i] == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 virConfFree(conf);
                 return -1;
             }
@@ -310,7 +310,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     if (p && p->str) {
         VIR_FREE(driver->saveImageFormat);
         if (!(driver->saveImageFormat = strdup(p->str))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFree(conf);
             return -1;
         }
@@ -321,7 +321,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
      if (p && p->str) {
          VIR_FREE(driver->hugetlbfs_mount);
          if (!(driver->hugetlbfs_mount = strdup(p->str))) {
-             virReportOOMError(NULL);
+             virReportOOMError();
              virConfFree(conf);
              return -1;
          }
@@ -467,7 +467,7 @@ qemudParseMachineTypesStr(const char *output,
     return 0;
 
   no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     virCapabilitiesFreeMachines(list, nitems);
     return -1;
 }
@@ -550,7 +550,7 @@ qemudGetOldMachinesFromInfo(virCapsGuestDomainInfoPtr info,
     }
 
     if (VIR_ALLOC_N(list, info->nmachines) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return 0;
     }
 
@@ -574,7 +574,7 @@ qemudGetOldMachinesFromInfo(virCapsGuestDomainInfoPtr info,
     return 1;
 
   no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     virCapabilitiesFreeMachines(list, info->nmachines);
     return 0;
 }
@@ -731,7 +731,7 @@ qemudProbeCPUModels(const char *qemu,
     }
 
     if (parse(output, count, cpus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -983,7 +983,7 @@ cleanup:
     return ret;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 
 error:
     virCapabilitiesFreeMachines(machines, nmachines);
@@ -1003,7 +1003,7 @@ qemudCapsInitCPU(virCapsPtr caps,
 
     if (VIR_ALLOC(cpu) < 0
         || !(cpu->arch = strdup(arch))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -1448,7 +1448,7 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
             return -1;
     } else if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
         if (!(brname = strdup(net->data.bridge.brname))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     } else {
@@ -1468,7 +1468,7 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
         strchr(net->ifname, '%')) {
         VIR_FREE(net->ifname);
         if (!(net->ifname = strdup("vnet%d"))) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
         /* avoid exposing vnet%d in dumpxml or error outputs */
@@ -1550,7 +1550,7 @@ static int qemuAssignDeviceDiskAliasLegacy(virDomainDiskDefPtr disk)
         devname = strdup(disk->dst);
 
     if (!devname) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1603,7 +1603,7 @@ static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk)
     }
 
     if (ret == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1632,7 +1632,7 @@ static int qemuAssignDeviceDiskAliasCustom(virDomainDiskDefPtr disk)
     return 0;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     return -1;
 }
 
@@ -1670,7 +1670,7 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx)
     }
 
     if (virAsprintf(&net->info.alias, "net%d", idx) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1697,7 +1697,7 @@ qemuAssignDeviceHostdevAlias(virDomainDefPtr def, virDomainHostdevDefPtr hostdev
     }
 
     if (virAsprintf(&hostdev->info.alias, "hostdev%d", idx) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1712,7 +1712,7 @@ qemuAssignDeviceControllerAlias(virDomainControllerDefPtr controller)
 
     if (virAsprintf(&controller->info.alias,  "%s%d", prefix,
                     controller->idx) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1780,7 +1780,7 @@ qemuAssignDeviceAliases(virDomainDefPtr def, int qemuCmdFlags)
     return 0;
 
     no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     return -1;
 }
 
@@ -1808,7 +1808,7 @@ static char *qemuPCIAddressAsString(virDomainDeviceInfoPtr dev)
                     dev->addr.pci.domain,
                     dev->addr.pci.bus,
                     dev->addr.pci.slot) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
     return addr;
@@ -1852,7 +1852,7 @@ qemuDomainPCIAddressSetPtr qemuDomainPCIAddressSetCreate(virDomainDefPtr def)
     return addrs;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 error:
     qemuDomainPCIAddressSetFree(addrs);
     return NULL;
@@ -2341,7 +2341,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
     }
 
     if (virBufferError(&opt)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2397,7 +2397,7 @@ qemuBuildDriveDevStr(virConnectPtr conn,
     virBufferVSprintf(&opt, ",id=%s", disk->info.alias);
 
     if (virBufferError(&opt)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2430,7 +2430,7 @@ qemuBuildControllerDevStr(virDomainControllerDefPtr def)
         goto error;
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2443,7 +2443,7 @@ error:
 
 
 char *
-qemuBuildNicStr(virConnectPtr conn,
+qemuBuildNicStr(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                 virDomainNetDefPtr net,
                 const char *prefix,
                 int vlan)
@@ -2460,7 +2460,7 @@ qemuBuildNicStr(virConnectPtr conn,
                     (net->model ? net->model : ""),
                     (net->info.alias ? ",name=" : ""),
                     (net->info.alias ? net->info.alias : "")) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2496,7 +2496,7 @@ qemuBuildNicDevStr(virDomainNetDefPtr net, int vlan)
         goto error;
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2509,7 +2509,7 @@ error:
 
 
 char *
-qemuBuildHostNetStr(virConnectPtr conn,
+qemuBuildHostNetStr(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                     virDomainNetDefPtr net,
                     char type_sep,
                     int vlan,
@@ -2583,7 +2583,7 @@ qemuBuildHostNetStr(virConnectPtr conn,
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2609,7 +2609,7 @@ qemuBuildWatchdogDevStr(virDomainWatchdogDefPtr dev)
         goto error;
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2632,7 +2632,7 @@ qemuBuildUSBInputDevStr(virDomainInputDefPtr dev)
     virBufferVSprintf(&buf, ",id=%s", dev->info.alias);
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2668,7 +2668,7 @@ qemuBuildSoundDevStr(virDomainSoundDefPtr sound)
         goto error;
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2695,7 +2695,7 @@ qemuBuildPCIHostdevDevStr(virDomainHostdevDefPtr dev)
         goto error;
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2716,7 +2716,7 @@ qemuBuildPCIHostdevPCIDevStr(virDomainHostdevDefPtr dev)
                     dev->source.subsys.u.pci.bus,
                     dev->source.subsys.u.pci.slot,
                     dev->source.subsys.u.pci.function) < 0)
-        virReportOOMError(NULL);
+        virReportOOMError();
 
     return ret;
 }
@@ -2738,7 +2738,7 @@ qemuBuildUSBHostdevDevStr(virDomainHostdevDefPtr dev)
                     dev->source.subsys.u.usb.bus,
                     dev->source.subsys.u.usb.device,
                     dev->info.alias) < 0)
-        virReportOOMError(NULL);
+        virReportOOMError();
 
     return ret;
 }
@@ -2759,7 +2759,7 @@ qemuBuildUSBHostdevUsbDevStr(virDomainHostdevDefPtr dev)
     if (virAsprintf(&ret, "host:%.3d.%.3d",
                     dev->source.subsys.u.usb.bus,
                     dev->source.subsys.u.usb.device) < 0)
-        virReportOOMError(NULL);
+        virReportOOMError();
 
     return ret;
 }
@@ -2834,7 +2834,7 @@ qemuBuildChrChardevStr(virDomainChrDefPtr dev)
     }
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -2913,7 +2913,7 @@ qemuBuildChrArgStr(virDomainChrDefPtr dev, const char *prefix)
     }
 
     if (virBufferError(&buf)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -3012,13 +3012,12 @@ cleanup:
     return ret;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     goto cleanup;
 }
 
 static char *
-qemuBuildSmpArgStr(virConnectPtr conn,
-                   const virDomainDefPtr def,
+qemuBuildSmpArgStr(const virDomainDefPtr def,
                    int qemuCmdFlags)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -3042,7 +3041,7 @@ qemuBuildSmpArgStr(virConnectPtr conn,
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -3285,7 +3284,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
     }
 
     ADD_ARG_LIT("-smp");
-    if (!(smp = qemuBuildSmpArgStr(conn, def, qemuCmdFlags)))
+    if (!(smp = qemuBuildSmpArgStr(def, qemuCmdFlags)))
         goto error;
     ADD_ARG(smp);
 
@@ -4095,7 +4094,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
     return 0;
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  error:
     if (tapfds &&
         *tapfds) {
@@ -4229,7 +4228,7 @@ no_memory:
     for (i = 0 ; i < argcount ; i++)
         VIR_FREE(arglist[i]);
     VIR_FREE(arglist);
-    virReportOOMError(NULL);
+    virReportOOMError();
     return -1;
 }
 
@@ -4331,7 +4330,7 @@ qemuParseCommandLineKeywords(virConnectPtr conn,
     return keywordCount;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     for (i = 0 ; i < keywordCount ; i++) {
         VIR_FREE(keywords[i]);
@@ -4369,7 +4368,7 @@ qemuParseCommandLineDisk(virConnectPtr conn,
         return NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4409,7 +4408,7 @@ qemuParseCommandLineDisk(virConnectPtr conn,
             if (!def->driverName) {
                 virDomainDiskDefFree(def);
                 def = NULL;
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             def->driverType = values[i];
@@ -4505,7 +4504,7 @@ qemuParseCommandLineDisk(virConnectPtr conn,
     if (!def->dst) {
         virDomainDiskDefFree(def);
         def = NULL;
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     if (STREQ(def->dst, "xvda"))
@@ -4598,7 +4597,7 @@ qemuParseCommandLineNet(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4746,7 +4745,7 @@ qemuParseCommandLinePCI(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4813,7 +4812,7 @@ qemuParseCommandLineUSB(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4966,7 +4965,7 @@ qemuParseCommandLineChr(virConnectPtr conn,
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainChrDefFree(def);
     return NULL;
@@ -4974,14 +4973,13 @@ error:
 
 
 static virCPUDefPtr
-qemuInitGuestCPU(virConnectPtr conn,
-                 virDomainDefPtr dom)
+qemuInitGuestCPU(virDomainDefPtr dom)
 {
     if (!dom->cpu) {
         virCPUDefPtr cpu;
 
         if (VIR_ALLOC(cpu) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
 
@@ -5003,7 +5001,7 @@ qemuParseCommandLineCPU(virConnectPtr conn,
     const char *p = val;
     const char *next;
 
-    if (!(cpu = qemuInitGuestCPU(conn, dom)))
+    if (!(cpu = qemuInitGuestCPU(dom)))
         goto error;
 
     do {
@@ -5056,7 +5054,7 @@ syntax:
     goto error;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     return -1;
 }
@@ -5107,7 +5105,7 @@ qemuParseCommandLineSmp(virConnectPtr conn,
     if (sockets && cores && threads) {
         virCPUDefPtr cpu;
 
-        if (!(cpu = qemuInitGuestCPU(conn, dom)))
+        if (!(cpu = qemuInitGuestCPU(dom)))
             goto error;
         cpu->sockets = sockets;
         cpu->cores = cores;
@@ -5655,7 +5653,7 @@ virDomainDefPtr qemuParseCommandLine(virConnectPtr conn,
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainDefFree(def);
     VIR_FREE(nics);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1e796ef..e75e9a2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -207,12 +207,12 @@ static int qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
     xmlNodePtr *nodes = NULL;
 
     if (VIR_ALLOC(priv->monConfig) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
     if (!(priv->monConfig->info.alias = strdup("monitor"))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -257,7 +257,7 @@ static int qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
     if (n) {
         priv->nvcpupids = n;
         if (VIR_REALLOC_N(priv->vcpupids, priv->nvcpupids) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto error;
         }
 
@@ -506,7 +506,7 @@ qemudLogFD(virConnectPtr conn, struct qemud_driver *driver, const char* name)
     if ((ret = snprintf(logfile, sizeof(logfile), "%s/%s.log",
                         driver->logDir, name))
         < 0 || ret >= sizeof(logfile)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -635,15 +635,14 @@ qemudAutostartConfigs(struct qemud_driver *driver) {
  * Returns 0 on success
  */
 static int
-qemudRemoveDomainStatus(virConnectPtr conn,
-                        struct qemud_driver *driver,
+qemudRemoveDomainStatus(struct qemud_driver *driver,
                         virDomainObjPtr vm)
 {
     char ebuf[1024];
     char *file = NULL;
 
     if (virAsprintf(&file, "%s/%s.xml", driver->stateDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return(-1);
     }
 
@@ -792,7 +791,7 @@ findVolumeQcowPassphrase(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
     if (VIR_ALLOC_N(passphrase, size + 1) < 0) {
         memset(data, 0, size);
         VIR_FREE(data);
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     memcpy(passphrase, data, size);
@@ -940,7 +939,7 @@ qemuCreateCapabilities(virCapsPtr oldcaps,
 
     /* Basic host arch / guest machine capabilities */
     if (!(caps = qemudCapsInit(oldcaps))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -970,7 +969,7 @@ qemuCreateCapabilities(virCapsPtr oldcaps,
     return caps;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     virCapabilitiesFree(caps);
     return NULL;
 }
@@ -1186,7 +1185,7 @@ qemudStartup(int privileged) {
     return 0;
 
 out_of_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 error:
     if (qemu_driver)
         qemuDriverUnlock(qemu_driver);
@@ -1393,8 +1392,7 @@ qemudReadLogOutput(virConnectPtr conn,
  * Returns -1 for error, 0 success, 1 continue reading
  */
 static int
-qemudExtractTTYPath(virConnectPtr conn,
-                    const char *haystack,
+qemudExtractTTYPath(const char *haystack,
                     size_t *offset,
                     char **path)
 {
@@ -1417,7 +1415,7 @@ qemudExtractTTYPath(virConnectPtr conn,
         if (c_isspace(*tmp)) {
             *path = strndup(dev, tmp-dev);
             if (*path == NULL) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 return -1;
             }
 
@@ -1472,7 +1470,7 @@ qemudFindCharDevicePTYsMonitor(virConnectPtr conn,
             chr->data.file.path = strdup(path);                           \
                                                                           \
             if (chr->data.file.path == NULL) {                            \
-                virReportOOMError(conn);                                  \
+                virReportOOMError();                                      \
                 return -1;                                                \
             }                                                             \
         }                                                                 \
@@ -1487,7 +1485,7 @@ qemudFindCharDevicePTYsMonitor(virConnectPtr conn,
 }
 
 static int
-qemudFindCharDevicePTYs(virConnectPtr conn,
+qemudFindCharDevicePTYs(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                         virDomainObjPtr vm,
                         const char *output,
                         int fd ATTRIBUTE_UNUSED)
@@ -1503,7 +1501,7 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
     for (i = 0 ; i < vm->def->nserials ; i++) {
         virDomainChrDefPtr chr = vm->def->serials[i];
         if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
-            if ((ret = qemudExtractTTYPath(conn, output, &offset,
+            if ((ret = qemudExtractTTYPath(output, &offset,
                                            &chr->data.file.path)) != 0)
                 return ret;
         }
@@ -1513,7 +1511,7 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
     for (i = 0 ; i < vm->def->nparallels ; i++) {
         virDomainChrDefPtr chr = vm->def->parallels[i];
         if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
-            if ((ret = qemudExtractTTYPath(conn, output, &offset,
+            if ((ret = qemudExtractTTYPath(output, &offset,
                                            &chr->data.file.path)) != 0)
                 return ret;
         }
@@ -1523,7 +1521,7 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
     for (i = 0 ; i < vm->def->nchannels ; i++) {
         virDomainChrDefPtr chr = vm->def->channels[i];
         if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
-            if ((ret = qemudExtractTTYPath(conn, output, &offset,
+            if ((ret = qemudExtractTTYPath(output, &offset,
                                            &chr->data.file.path)) != 0)
                 return ret;
         }
@@ -1576,7 +1574,7 @@ qemudWaitForMonitor(virConnectPtr conn,
      * log output method. */
     virHashTablePtr paths = virHashCreate(0);
     if (paths == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1609,7 +1607,7 @@ qemuDetectVcpuPIDs(virConnectPtr conn,
     if (vm->def->virtType != VIR_DOMAIN_VIRT_KVM) {
         priv->nvcpupids = 1;
         if (VIR_ALLOC_N(priv->vcpupids, priv->nvcpupids) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
         priv->vcpupids[0] = vm->pid;
@@ -1662,7 +1660,7 @@ qemudInitCpuAffinity(virConnectPtr conn,
 
     cpumaplen = VIR_CPU_MAPLEN(maxcpu);
     if (VIR_ALLOC_N(cpumap, cpumaplen) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -2499,8 +2497,7 @@ static int qemudSecurityHook(void *data) {
 }
 
 static int
-qemuPrepareMonitorChr(virConnectPtr conn,
-                      struct qemud_driver *driver,
+qemuPrepareMonitorChr(struct qemud_driver *driver,
                       virDomainChrDefPtr monConfig,
                       const char *vm)
 {
@@ -2510,13 +2507,13 @@ qemuPrepareMonitorChr(virConnectPtr conn,
     monConfig->data.nix.listen = 1;
 
     if (!(monConfig->info.alias = strdup("monitor"))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
     if (virAsprintf(&monConfig->data.nix.path, "%s/%s.monitor",
                     driver->libDir, vm) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -2619,11 +2616,11 @@ static int qemudStartVMDaemon(virConnectPtr conn,
         goto cleanup;
 
     if (VIR_ALLOC(priv->monConfig) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
-    if (qemuPrepareMonitorChr(conn, driver, priv->monConfig, vm->def->name) < 0)
+    if (qemuPrepareMonitorChr(driver, priv->monConfig, vm->def->name) < 0)
         goto cleanup;
 
 #if HAVE_YAJL
@@ -2905,7 +2902,7 @@ retry:
                  vm->def->name);
     }
 
-    qemudRemoveDomainStatus(conn, driver, vm);
+    qemudRemoveDomainStatus(driver, vm);
 
     vm->pid = -1;
     vm->def->id = -1;
@@ -2938,7 +2935,7 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
                                 "qemu:///system" :
                                 "qemu:///session");
         if (!conn->uri) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
@@ -3088,7 +3085,7 @@ static char *qemudGetCapabilities(virConnectPtr conn) {
     qemu_driver->caps = caps;
 
     if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
 
 cleanup:
     qemuDriverUnlock(driver);
@@ -3605,7 +3602,7 @@ static char *qemudDomainGetOSType(virDomainPtr dom) {
     }
 
     if (!(type = strdup(vm->def->os.type)))
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     if (vm)
@@ -4512,7 +4509,7 @@ static int qemudDomainRestore(virConnectPtr conn,
     }
 
     if (VIR_ALLOC_N(xml, header.xml_len) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4798,7 +4795,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
         goto cleanup;
     }
 
-    if (qemuPrepareMonitorChr(conn, driver, &monConfig, def->name) < 0)
+    if (qemuPrepareMonitorChr(driver, &monConfig, def->name) < 0)
         goto cleanup;
 
     if (qemudBuildCommandLine(conn, driver, def,
@@ -4824,7 +4821,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4932,7 +4929,7 @@ qemudCanonicalizeMachineFromInfo(virDomainDefPtr def,
             continue;
 
         if (!(*canonical = strdup(machine->canonical))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
 
@@ -4949,7 +4946,7 @@ qemudCanonicalizeMachineDirect(virDomainDefPtr def, char **canonical)
     int i, nmachines = 0;
 
     if (qemudProbeMachineTypes(def->emulator, &machines, &nmachines) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -5253,7 +5250,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
     }
 
     if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -5334,12 +5331,12 @@ static int qemudDomainAttachPciControllerDevice(virConnectPtr conn,
     }
 
     if (!(devstr = qemuBuildControllerDevStr(controller))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_REALLOC_N(vm->def->controllers, vm->def->ncontrollers+1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -5392,7 +5389,7 @@ qemuDomainFindOrCreateSCSIDiskController(virConnectPtr conn,
     /* No SCSI controller present, for back compatability we
      * now hotplug a controller */
     if (VIR_ALLOC(cont) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
     cont->type = VIR_DOMAIN_CONTROLLER_TYPE_SCSI;
@@ -5466,7 +5463,7 @@ static int qemudDomainAttachSCSIDisk(virConnectPtr conn,
     }
 
     if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -5556,7 +5553,7 @@ static int qemudDomainAttachUsbMassstorageDevice(virConnectPtr conn,
     }
 
     if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -5738,7 +5735,7 @@ try_tapfd_close:
     goto cleanup;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     goto cleanup;
 }
 
@@ -5756,7 +5753,7 @@ static int qemudDomainAttachHostPciDevice(virConnectPtr conn,
     char *devstr = NULL;
 
     if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -5820,8 +5817,7 @@ error:
 }
 
 
-static int qemudDomainAttachHostUsbDevice(virConnectPtr conn,
-                                          struct qemud_driver *driver,
+static int qemudDomainAttachHostUsbDevice(struct qemud_driver *driver,
                                           virDomainObjPtr vm,
                                           virDomainHostdevDefPtr hostdev,
                                           int qemuCmdFlags)
@@ -5835,7 +5831,7 @@ static int qemudDomainAttachHostUsbDevice(virConnectPtr conn,
         goto error;
 
     if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -5888,7 +5884,7 @@ static int qemudDomainAttachHostDevice(virConnectPtr conn,
         break;
 
     case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB:
-        if (qemudDomainAttachHostUsbDevice(conn, driver, vm,
+        if (qemudDomainAttachHostUsbDevice(driver, vm,
                                            hostdev, qemuCmdFlags) < 0)
             goto error;
         break;
@@ -6225,7 +6221,7 @@ qemudDomainDetachNetDevice(virConnectPtr conn,
     }
 
     if (virAsprintf(&hostnet_name, "host%s", detach->info.alias) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -6580,7 +6576,7 @@ static char *qemuGetSchedulerType(virDomainPtr dom,
 
     ret = strdup("posix");
     if (!ret)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     qemuDriverUnlock(driver);
@@ -6997,7 +6993,7 @@ qemudDomainMemoryPeek (virDomainPtr dom,
     }
 
     if (virAsprintf(&tmp, driver->cacheDir,  "/qemu.mem.XXXXXX") < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto endjob;
     }
 
@@ -7313,7 +7309,7 @@ static struct qemuStreamMigFile *qemuStreamMigOpen(virStreamPtr st,
     int ret;
 
     if (VIR_ALLOC(qemust) < 0) {
-        virReportOOMError(st->conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -7484,7 +7480,7 @@ qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
 
     if (virAsprintf(&unixfile, "%s/qemu.tunnelmigrate.dest.%s",
                     driver->stateDir, vm->def->name) < 0) {
-        virReportOOMError (dconn);
+        virReportOOMError();
         goto endjob;
     }
     unlink(unixfile);
@@ -7506,7 +7502,7 @@ qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
         goto endjob;
     }
     if (internalret < 0) {
-        virReportOOMError(dconn);
+        virReportOOMError();
         goto endjob;
     }
     /* Start the QEMU daemon, with the same command-line arguments plus
@@ -7637,7 +7633,7 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
         internalret = virAsprintf(uri_out, "tcp:%s:%d", hostname, this_port);
         VIR_FREE(hostname);
         if (internalret < 0) {
-            virReportOOMError (dconn);
+            virReportOOMError();
             goto cleanup;
         }
     } else {
@@ -7661,7 +7657,7 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
 
             /* Caller frees */
             if (virAsprintf(uri_out, "%s:%d", uri_in, this_port) < 0) {
-                virReportOOMError (dconn);
+                virReportOOMError();
                 goto cleanup;
             }
 
@@ -7772,7 +7768,7 @@ static int doNativeMigrate(virDomainPtr dom,
         /* HACK: source host generates bogus URIs, so fix them up */
         char *tmpuri;
         if (virAsprintf(&tmpuri, "tcp://%s", uri + strlen("tcp:")) < 0) {
-            virReportOOMError(dom->conn);
+            virReportOOMError();
             goto cleanup;
         }
         uribits = xmlParseURI(tmpuri);
@@ -7898,7 +7894,7 @@ static int doTunnelMigrate(virDomainPtr dom,
 
     if (virAsprintf(&unixfile, "%s/qemu.tunnelmigrate.src.%s",
                     driver->stateDir, vm->def->name) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 9e09876..c1db64c 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -575,7 +575,7 @@ qemuMonitorOpen(virDomainObjPtr vm,
     }
 
     if (VIR_ALLOC(mon) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index a556088..6ced8cd 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -188,11 +188,11 @@ qemuMonitorJSONCommandWithFd(qemuMonitorPtr mon,
     memset(&msg, 0, sizeof msg);
 
     if (!(cmdstr = virJSONValueToString(cmd))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
     if (virAsprintf(&msg.txBuffer, "%s\r\n", cmdstr) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
     msg.txLength = strlen(msg.txBuffer);
@@ -350,7 +350,7 @@ qemuMonitorJSONCommandAddTimestamp(virJSONValuePtr obj)
     return 0;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     virJSONValueFree(timestamp);
     return -1;
 }
@@ -446,7 +446,7 @@ qemuMonitorJSONMakeCommand(const char *cmdname,
     return obj;
 
 no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 error:
     virJSONValueFree(obj);
     virJSONValueFree(jargs);
@@ -569,7 +569,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
     }
 
     if (VIR_REALLOC_N(threads, ncpus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -975,7 +975,7 @@ int qemuMonitorJSONSetMigrationSpeed(qemuMonitorPtr mon,
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;
     if (virAsprintf(&bandwidthstr, "%lum", bandwidth) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     cmd = qemuMonitorJSONMakeCommand("migrate_set_speed",
@@ -1123,7 +1123,7 @@ int qemuMonitorJSONMigrateToHost(qemuMonitorPtr mon,
     int ret;
 
     if (virAsprintf(&uri, "tcp:%s:%d", hostname, port) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1147,19 +1147,19 @@ int qemuMonitorJSONMigrateToCommand(qemuMonitorPtr mon,
 
     argstr = virArgvToString(argv);
     if (!argstr) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     /* Migrate to file */
     safe_target = qemuMonitorEscapeShell(target);
     if (!safe_target) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&dest, "exec:%s >>%s 2>/dev/null", argstr, safe_target) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1180,7 +1180,7 @@ int qemuMonitorJSONMigrateToUnix(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&dest, "unix:%s", unixfile) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1241,7 +1241,7 @@ int qemuMonitorJSONAddUSBDisk(qemuMonitorPtr mon,
     char *disk;
 
     if (virAsprintf(&disk, "disk:%s", path) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1261,7 +1261,7 @@ int qemuMonitorJSONAddUSBDeviceExact(qemuMonitorPtr mon,
     char *addr;
 
     if (virAsprintf(&addr, "host:%.3d.%.3d", bus, dev) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1280,7 +1280,7 @@ int qemuMonitorJSONAddUSBDeviceMatch(qemuMonitorPtr mon,
     char *addr;
 
     if (virAsprintf(&addr, "host:%.4x:%.4x", vendor, product) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1346,7 +1346,7 @@ int qemuMonitorJSONAddPCIHostDevice(qemuMonitorPtr mon,
     /* XXX hostDomain */
     if (virAsprintf(&dev, "host=%.2x:%.2x.%.1x",
                     hostAddr->bus, hostAddr->slot, hostAddr->function) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1387,7 +1387,7 @@ int qemuMonitorJSONAddPCIDisk(qemuMonitorPtr mon,
     memset(guestAddr, 0, sizeof(*guestAddr));
 
     if (virAsprintf(&dev, "file=%s,if=%s", path, bus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1458,7 +1458,7 @@ int qemuMonitorJSONRemovePCIDevice(qemuMonitorPtr mon,
     /* XXX what about function ? */
     if (virAsprintf(&addr, "%.4x:%.2x:%.2x",
                     guestAddr->domain, guestAddr->bus, guestAddr->slot) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1625,7 +1625,7 @@ static int qemuMonitorJSONExtractPtyPaths(virJSONValuePtr reply,
         if (STRPREFIX(type, "pty:")) {
             char *path = strdup(type + strlen("pty:"));
             if (!path) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto cleanup;
             }
 
@@ -1682,7 +1682,7 @@ int qemuMonitorJSONAttachPCIDiskController(qemuMonitorPtr mon,
     memset(guestAddr, 0, sizeof(*guestAddr));
 
     if (virAsprintf(&dev, "if=%s", bus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1751,7 +1751,7 @@ int qemuMonitorJSONAttachDrive(qemuMonitorPtr mon,
 
     if (virAsprintf(&dev, "%.2x:%.2x.%.1x",
                     controllerAddr->bus, controllerAddr->slot, controllerAddr->function) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 42ce363..ce325f5 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -219,7 +219,7 @@ qemuMonitorCommandWithHandler(qemuMonitorPtr mon,
     memset(&msg, 0, sizeof msg);
 
     if (virAsprintf(&msg.txBuffer, "%s\r", cmd) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     msg.txLength = strlen(msg.txBuffer);
@@ -244,7 +244,7 @@ qemuMonitorCommandWithHandler(qemuMonitorPtr mon,
     } else {
         *reply = strdup("");
         if (!*reply) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
     }
@@ -765,7 +765,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
      * we just worked in bytes with unsigned long long everywhere.
      */
     if (virAsprintf(&cmd, "balloon %lu", (newmem / 1024)) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -798,7 +798,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "eject %s", devname) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -837,12 +837,12 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
     int ret = -1;
 
     if (!(safepath = qemuMonitorEscapeArg(newmedia))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&cmd, "change %s \"%s\"", devname, safepath) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -882,12 +882,12 @@ static int qemuMonitorTextSaveMemory(qemuMonitorPtr mon,
     int ret = -1;
 
     if (!(safepath = qemuMonitorEscapeArg(path))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&cmd, "%s %llu %zi \"%s\"", cmdtype, offset, length, safepath) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -934,7 +934,7 @@ int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "migrate_set_speed %lum", bandwidth) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1049,7 +1049,7 @@ static int qemuMonitorTextMigrate(qemuMonitorPtr mon,
     const char *extra;
 
     if (!safedest) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1059,7 +1059,7 @@ static int qemuMonitorTextMigrate(qemuMonitorPtr mon,
         extra = " ";
 
     if (virAsprintf(&cmd, "migrate %s\"%s\"", extra, safedest) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1102,7 +1102,7 @@ int qemuMonitorTextMigrateToHost(qemuMonitorPtr mon,
     int ret;
 
     if (virAsprintf(&uri, "tcp:%s:%d", hostname, port) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1126,19 +1126,19 @@ int qemuMonitorTextMigrateToCommand(qemuMonitorPtr mon,
 
     argstr = virArgvToString(argv);
     if (!argstr) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     /* Migrate to file */
     safe_target = qemuMonitorEscapeShell(target);
     if (!safe_target) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&dest, "exec:%s >>%s 2>/dev/null", argstr, safe_target) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1159,7 +1159,7 @@ int qemuMonitorTextMigrateToUnix(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&dest, "unix:%s", unixfile) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1194,12 +1194,12 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
 
     safepath = qemuMonitorEscapeArg(path);
     if (!safepath) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
     if (virAsprintf(&cmd, "usb_add disk:%s", safepath) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1234,7 +1234,7 @@ static int qemuMonitorTextAddUSBDevice(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "usb_add %s", addr) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1269,7 +1269,7 @@ int qemuMonitorTextAddUSBDeviceExact(qemuMonitorPtr mon,
     char *addr;
 
     if (virAsprintf(&addr, "host:%.3d.%.3d", bus, dev) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1287,7 +1287,7 @@ int qemuMonitorTextAddUSBDeviceMatch(qemuMonitorPtr mon,
     char *addr;
 
     if (virAsprintf(&addr, "host:%.4x:%.4x", vendor, product) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1375,7 +1375,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
     /* XXX hostAddr->domain */
     if (virAsprintf(&cmd, "pci_add pci_addr=auto host host=%.2x:%.2x.%.1x",
                     hostAddr->bus, hostAddr->slot, hostAddr->function) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1419,14 +1419,14 @@ int qemuMonitorTextAddPCIDisk(qemuMonitorPtr mon,
 
     safe_path = qemuMonitorEscapeArg(path);
     if (!safe_path) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
 try_command:
     if (virAsprintf(&cmd, "pci_add %s storage file=%s,if=%s",
                     (tryOldSyntax ? "0": "pci_addr=auto"), safe_path, bus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1468,7 +1468,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "pci_add pci_addr=auto nic %s", nicstr) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1504,14 +1504,14 @@ int qemuMonitorTextRemovePCIDevice(qemuMonitorPtr mon,
 try_command:
     if (tryOldSyntax) {
         if (virAsprintf(&cmd, "pci_del 0 %.2x", guestAddr->slot) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto cleanup;
         }
     } else {
         /* XXX function ? */
         if (virAsprintf(&cmd, "pci_del pci_addr=%.4x:%.2x:%.2x",
                         guestAddr->domain, guestAddr->bus, guestAddr->slot) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -1560,7 +1560,7 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "getfd %s", fdname) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1596,7 +1596,7 @@ int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "closefd %s", fdname) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1632,7 +1632,7 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "host_net_add %s", netstr) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1662,7 +1662,7 @@ int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
     int ret = -1;
 
     if (virAsprintf(&cmd, "host_net_remove %d %s", vlan, netname) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1748,7 +1748,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
         *eol = '\0';
         char *path = strdup(needle + strlen(NEEDLE));
         if (path == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -1782,7 +1782,7 @@ int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon,
 try_command:
     if (virAsprintf(&cmd, "pci_add %s storage if=%s",
                     (tryOldSyntax ? "0": "pci_addr=auto"), bus) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1872,7 +1872,7 @@ int qemuMonitorTextAttachDrive(qemuMonitorPtr mon,
 
     safe_str = qemuMonitorEscapeArg(drivestr);
     if (!safe_str) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1882,7 +1882,7 @@ try_command:
                       controllerAddr->domain, controllerAddr->bus,
                       controllerAddr->slot, safe_str);
     if (ret == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2013,7 +2013,7 @@ int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
         GET_INT(p, 16, product);
 
         if (VIR_REALLOC_N(addrs, naddrs+1) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             goto error;
         }
 
@@ -2054,12 +2054,12 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
     int ret = -1;
 
     if (!(safedev = qemuMonitorEscapeArg(devicestr))) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&cmd, "device_add %s", safedev) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2094,7 +2094,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
 
     safe_str = qemuMonitorEscapeArg(drivestr);
     if (!safe_str) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -2102,7 +2102,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
      * address required when attaching drives to a controller */
     ret = virAsprintf(&cmd, "drive_add dummy %s", safe_str);
     if (ret == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d6f5fce..809d386 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -557,7 +557,7 @@ doRemoteOpen (virConnectPtr conn,
     }
 
     if (!name) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failed;
     }
 
@@ -873,18 +873,18 @@ doRemoteOpen (virConnectPtr conn,
         conn->uri = xmlParseURI(uriret.uri);
         VIR_FREE(uriret.uri);
         if (!conn->uri) {
-            virReportOOMError (conn);
+            virReportOOMError();
             goto failed;
         }
     }
 
     if(VIR_ALLOC(priv->callbackList)<0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failed;
     }
 
     if(VIR_ALLOC(priv->domainEvents)<0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto failed;
     }
 
@@ -932,7 +932,7 @@ doRemoteOpen (virConnectPtr conn,
     return retcode;
 
  out_of_memory:
-    virReportOOMError (conn);
+    virReportOOMError();
 
  failed:
     /* Close the socket if we failed. */
@@ -969,7 +969,7 @@ remoteAllocPrivateData(virConnectPtr conn)
 {
     struct private_data *priv;
     if (VIR_ALLOC(priv) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2907,7 +2907,7 @@ remoteListDefinedDomains (virConnectPtr conn, char **const names, int maxnames)
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -3244,7 +3244,7 @@ remoteDomainSetSchedulerParameters (virDomainPtr domain,
     /* Serialise the scheduler parameters. */
     args.params.params_len = nparams;
     if (VIR_ALLOC_N(args.params.params_val, nparams) < 0) {
-        virReportOOMError(domain->conn);
+        virReportOOMError();
         goto done;
     }
 
@@ -3253,7 +3253,7 @@ remoteDomainSetSchedulerParameters (virDomainPtr domain,
         // call() will free this:
         args.params.params_val[i].field = strdup (params[i].field);
         if (args.params.params_val[i].field == NULL) {
-            virReportOOMError (domain->conn);
+            virReportOOMError();
             do_error = 1;
         }
         args.params.params_val[i].value.type = params[i].type;
@@ -3640,7 +3640,7 @@ remoteListNetworks (virConnectPtr conn, char **const names, int maxnames)
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -3722,7 +3722,7 @@ remoteListDefinedNetworks (virConnectPtr conn,
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -4195,7 +4195,7 @@ remoteListInterfaces (virConnectPtr conn, char **const names, int maxnames)
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -4276,7 +4276,7 @@ remoteListDefinedInterfaces (virConnectPtr conn, char **const names, int maxname
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -4632,7 +4632,7 @@ remoteListStoragePools (virConnectPtr conn, char **const names, int maxnames)
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -4710,7 +4710,7 @@ remoteListDefinedStoragePools (virConnectPtr conn,
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -5275,7 +5275,7 @@ remoteStoragePoolListVolumes (virStoragePoolPtr pool, char **const names, int ma
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(pool->conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -5684,7 +5684,7 @@ static int remoteNodeListDevices(virConnectPtr conn,
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -5846,7 +5846,7 @@ static int remoteNodeDeviceListCaps(virNodeDevicePtr dev,
             for (--i; i >= 0; --i)
                 VIR_FREE(names[i]);
 
-            virReportOOMError(dev->conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -6111,7 +6111,7 @@ static char *addrToString(struct sockaddr_storage *sa, socklen_t salen)
     }
 
     if (virAsprintf(&addr, "%s;%s", host, port) == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -6909,7 +6909,7 @@ remoteSecretListSecrets (virConnectPtr conn, char **uuids, int maxuuids)
             for (--i; i >= 0; --i)
                 VIR_FREE(uuids[i]);
 
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -7123,7 +7123,7 @@ remoteStreamOpen(virStreamPtr st,
     struct private_stream_data *stpriv;
 
     if (VIR_ALLOC(stpriv) < 0) {
-        virReportOOMError(st->conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -7154,7 +7154,7 @@ remoteStreamPacket(virStreamPtr st,
     memset(&hdr, 0, sizeof hdr);
 
     if (VIR_ALLOC(thiscall) < 0) {
-        virReportOOMError(st->conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -7333,7 +7333,7 @@ remoteStreamRecv(virStreamPtr st,
         struct remote_thread_call *thiscall;
 
         if (VIR_ALLOC(thiscall) < 0) {
-            virReportOOMError(st->conn);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -7551,7 +7551,7 @@ prepareCall(virConnectPtr conn,
     struct remote_thread_call *rv;
 
     if (VIR_ALLOC(rv) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -8592,7 +8592,7 @@ call (virConnectPtr conn, struct private_data *priv,
                            ret_filter, ret);
 
     if (!thiscall) {
-        virReportOOMError (flags & REMOTE_CALL_IN_OPEN ? NULL : conn);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 4478296..2b72a28 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -162,7 +162,7 @@ replaceFile(virConnectPtr conn, const char *filename, void *data, size_t size)
     int fd = -1, ret = -1;
 
     if (virAsprintf(&tmp_path, "%sXXXXXX", filename) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     fd = mkstemp (tmp_path);
@@ -206,7 +206,7 @@ cleanup:
 }
 
 static char *
-secretComputePath(virConnectPtr conn, virSecretDriverStatePtr driver,
+secretComputePath(virSecretDriverStatePtr driver,
                   const virSecretEntry *secret, const char *suffix)
 {
     char *ret;
@@ -216,23 +216,25 @@ secretComputePath(virConnectPtr conn, virSecretDriverStatePtr driver,
 
     if (virAsprintf(&ret, "%s/%s%s", driver->directory, uuidstr, suffix) < 0)
         /* ret is NULL */
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return ret;
 }
 
 static char *
-secretXMLPath(virConnectPtr conn, virSecretDriverStatePtr driver,
+secretXMLPath(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
+              virSecretDriverStatePtr driver,
               const virSecretEntry *secret)
 {
-    return secretComputePath(conn, driver, secret, ".xml");
+    return secretComputePath(driver, secret, ".xml");
 }
 
 static char *
-secretBase64Path(virConnectPtr conn, virSecretDriverStatePtr driver,
+secretBase64Path(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
+                 virSecretDriverStatePtr driver,
                  const virSecretEntry *secret)
 {
-    return secretComputePath(conn, driver, secret, ".base64");
+    return secretComputePath(driver, secret, ".base64");
 }
 
 static int
@@ -293,7 +295,7 @@ secretSaveValue(virConnectPtr conn, virSecretDriverStatePtr driver,
     base64_encode_alloc((const char *)secret->value, secret->value_size,
                         &base64);
     if (base64 == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -387,7 +389,7 @@ secretLoadValue(virConnectPtr conn, virSecretDriverStatePtr driver,
     }
 
     if (VIR_ALLOC_N(contents, st.st_size) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     if (saferead(fd, contents, st.st_size) != st.st_size) {
@@ -403,7 +405,7 @@ secretLoadValue(virConnectPtr conn, virSecretDriverStatePtr driver,
         goto cleanup;
     }
     if (value == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -438,7 +440,7 @@ secretLoad(virConnectPtr conn, virSecretDriverStatePtr driver,
 
     if (virAsprintf(&xml_filename, "%s/%s", driver->directory,
                     xml_basename) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     def = virSecretDefParseFile(conn, xml_filename);
@@ -450,7 +452,7 @@ secretLoad(virConnectPtr conn, virSecretDriverStatePtr driver,
         goto cleanup;
 
     if (VIR_ALLOC(secret) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     secret->def = def;
@@ -581,7 +583,7 @@ secretListSecrets(virConnectPtr conn, char **uuids, int maxuuids)
         if (i == maxuuids)
             break;
         if (VIR_ALLOC_N(uuidstr, VIR_UUID_STRING_BUFLEN) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
         virUUIDFormat(secret->def->uuid, uuidstr);
@@ -705,7 +707,7 @@ secretDefineXML(virConnectPtr conn, const char *xml,
 
         /* No existing secret at all, create one */
         if (VIR_ALLOC(secret) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -822,7 +824,7 @@ secretSetValue(virSecretPtr obj, const unsigned char *value,
     virSecretEntryPtr secret;
 
     if (VIR_ALLOC_N(new_value, value_size) < 0) {
-        virReportOOMError(obj->conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -905,7 +907,7 @@ secretGetValue(virSecretPtr obj, size_t *value_size, unsigned int flags)
     }
 
     if (VIR_ALLOC_N(ret, secret->value_size) < 0) {
-        virReportOOMError(obj->conn);
+        virReportOOMError();
         goto cleanup;
     }
     memcpy(ret, secret->value, secret->value_size);
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
index 138751c..15a9d59 100644
--- a/src/security/security_apparmor.c
+++ b/src/security/security_apparmor.c
@@ -57,7 +57,7 @@ profile_status(const char *str, const int check_enforcing)
 
     /* create string that is '<str> \0' for accurate matching */
     if (virAsprintf(&tmp, "%s ", str) == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return rc;
     }
 
@@ -65,7 +65,7 @@ profile_status(const char *str, const int check_enforcing)
         /* create string that is '<str> (enforce)\0' for accurate matching */
         if (virAsprintf(&etmp, "%s (enforce)", str) == -1) {
             VIR_FREE(tmp);
-            virReportOOMError(NULL);
+            virReportOOMError();
             return rc;
         }
     }
@@ -112,7 +112,7 @@ profile_status_file(const char *str)
     int len;
 
     if (virAsprintf(&profile, "%s/%s", APPARMOR_DIR "/libvirt", str) == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return rc;
     }
 
@@ -127,7 +127,7 @@ profile_status_file(const char *str)
 
     /* create string that is ' <str> flags=(complain)\0' */
     if (virAsprintf(&tmp, " %s flags=(complain)", str) == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto failed;
     }
 
@@ -237,14 +237,14 @@ remove_profile(const char *profile)
 }
 
 static char *
-get_profile_name(virConnectPtr conn, virDomainObjPtr vm)
+get_profile_name(virDomainObjPtr vm)
 {
     char uuidstr[VIR_UUID_STRING_BUFLEN];
     char *name = NULL;
 
     virUUIDFormat(vm->def->uuid, uuidstr);
     if (virAsprintf(&name, "%s%s", AA_PREFIX, uuidstr) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -290,7 +290,7 @@ AppArmorSecurityDriverProbe(void)
     /* see if template file exists */
     if (virAsprintf(&template, "%s/TEMPLATE",
                                APPARMOR_DIR "/libvirt") == -1) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return rc;
     }
 
@@ -339,12 +339,12 @@ AppArmorGenSecurityLabel(virConnectPtr conn, virDomainObjPtr vm)
         return rc;
     }
 
-    if ((profile_name = get_profile_name(conn, vm)) == NULL)
+    if ((profile_name = get_profile_name(vm)) == NULL)
         return rc;
 
     vm->def->seclabel.label = strndup(profile_name, strlen(profile_name));
     if (!vm->def->seclabel.label) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto clean;
     }
 
@@ -352,13 +352,13 @@ AppArmorGenSecurityLabel(virConnectPtr conn, virDomainObjPtr vm)
     vm->def->seclabel.imagelabel = strndup(profile_name,
                                            strlen(profile_name));
     if (!vm->def->seclabel.imagelabel) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto err;
     }
 
     vm->def->seclabel.model = strdup(SECURITY_APPARMOR_NAME);
     if (!vm->def->seclabel.model) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
@@ -405,7 +405,7 @@ AppArmorGetSecurityProcessLabel(virConnectPtr conn,
     int rc = -1;
     char *profile_name = NULL;
 
-    if ((profile_name = get_profile_name(conn, vm)) == NULL)
+    if ((profile_name = get_profile_name(vm)) == NULL)
         return rc;
 
     if (virStrcpy(sec->label, profile_name,
@@ -471,7 +471,7 @@ AppArmorSetSecurityProcessLabel(virConnectPtr conn,
     int rc = -1;
     char *profile_name = NULL;
 
-    if ((profile_name = get_profile_name(conn, vm)) == NULL)
+    if ((profile_name = get_profile_name(vm)) == NULL)
         return rc;
 
     if (STRNEQ(drv->name, secdef->model)) {
@@ -511,7 +511,7 @@ AppArmorRestoreSecurityImageLabel(virConnectPtr conn,
     if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC)
         return 0;
 
-    if ((profile_name = get_profile_name(conn, vm)) == NULL)
+    if ((profile_name = get_profile_name(vm)) == NULL)
         return rc;
 
     /* Update the profile only if it is loaded */
@@ -555,7 +555,7 @@ AppArmorSetSecurityImageLabel(virConnectPtr conn,
             return rc;
         }
 
-        if ((profile_name = get_profile_name(conn, vm)) == NULL)
+        if ((profile_name = get_profile_name(vm)) == NULL)
             return rc;
 
         /* update the profile only if it is loaded */
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 9f1a644..67687c6 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -204,7 +204,7 @@ SELinuxGenSecurityLabel(virConnectPtr conn,
     }
     vm->def->seclabel.model = strdup(SECURITY_SELINUX_NAME);
     if (!vm->def->seclabel.model) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err;
     }
 
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index e79294a..b22c031 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -139,7 +139,7 @@ virStorageBackendCopyToFD(virConnectPtr conn,
     bzero(&zerobuf, sizeof(zerobuf));
 
     if (VIR_ALLOC_N(buf, bytes) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -434,7 +434,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
 
     if (VIR_ALLOC(enc_secret) < 0 || VIR_REALLOC_N(enc->secrets, 1) < 0 ||
         VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -446,7 +446,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
     def->usage_type = VIR_SECRET_USAGE_TYPE_VOLUME;
     def->usage.volume = strdup(vol->target.path);
     if (def->usage.volume == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     xml = virSecretDefFormat(conn, def);
@@ -1012,7 +1012,7 @@ virStorageBackendUpdateVolTargetInfoFD(virConnectPtr conn,
     } else {
         target->perms.label = strdup(filecon);
         if (target->perms.label == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
         freecon(filecon);
@@ -1164,7 +1164,7 @@ virStorageBackendStablePath(virConnectPtr conn,
         if (virAsprintf(&stablepath, "%s/%s",
                         pool->def->target.path,
                         dent->d_name) == -1) {
-            virReportOOMError(conn);
+            virReportOOMError();
             closedir(dh);
             return NULL;
         }
@@ -1187,7 +1187,7 @@ virStorageBackendStablePath(virConnectPtr conn,
     stablepath = strdup(devpath);
 
     if (stablepath == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return stablepath;
 }
@@ -1224,7 +1224,7 @@ virStorageBackendRunProgRegex(virConnectPtr conn,
 
     /* Compile all regular expressions */
     if (VIR_ALLOC_N(reg, nregex) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -1249,11 +1249,11 @@ virStorageBackendRunProgRegex(virConnectPtr conn,
 
     /* Storage for matched variables */
     if (VIR_ALLOC_N(groups, totgroups) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     if (VIR_ALLOC_N(vars, maxvars+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1289,7 +1289,7 @@ virStorageBackendRunProgRegex(virConnectPtr conn,
                     line[vars[j+1].rm_eo] = '\0';
                     if ((groups[ngroup++] =
                          strdup(line + vars[j+1].rm_so)) == NULL) {
-                        virReportOOMError(conn);
+                        virReportOOMError();
                         goto cleanup;
                     }
                 }
@@ -1388,7 +1388,7 @@ virStorageBackendRunProgNul(virConnectPtr conn,
         return -1;
 
     if (VIR_ALLOC_N(v, n_columns) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
     for (i = 0; i < n_columns; i++)
diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 5ecf210..16eba4e 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -48,13 +48,13 @@ virStorageBackendDiskMakeDataVol(virConnectPtr conn,
 
     if (vol == NULL) {
         if (VIR_ALLOC(vol) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
         if (VIR_REALLOC_N(pool->volumes.objs,
                           pool->volumes.count+1) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             virStorageVolDefFree(vol);
             return -1;
         }
@@ -65,14 +65,14 @@ virStorageBackendDiskMakeDataVol(virConnectPtr conn,
          */
         tmp = strrchr(groups[0], '/');
         if ((vol->name = strdup(tmp ? tmp + 1 : groups[0])) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     }
 
     if (vol->target.path == NULL) {
         if ((devpath = strdup(groups[0])) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
@@ -91,14 +91,14 @@ virStorageBackendDiskMakeDataVol(virConnectPtr conn,
     if (vol->key == NULL) {
         /* XXX base off a unique key of the underlying disk */
         if ((vol->key = strdup(vol->target.path)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     }
 
     if (vol->source.extents == NULL) {
         if (VIR_ALLOC(vol->source.extents) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
         vol->source.nextent = 1;
@@ -119,7 +119,7 @@ virStorageBackendDiskMakeDataVol(virConnectPtr conn,
 
         if ((vol->source.extents[0].path =
              strdup(pool->def->source.devices[0].path)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     }
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 0d1c7a7..47cdd6a 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -99,7 +99,7 @@ virStorageBackendProbeTarget(virConnectPtr conn,
 
     if (encryption != NULL && meta.encrypted) {
         if (VIR_ALLOC(*encryption) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             if (backingStore)
                 VIR_FREE(*backingStore);
             return -1;
@@ -166,7 +166,7 @@ virStorageBackendFileSystemNetFindPoolSourcesFunc(virConnectPtr conn,
 
     if (!(src->host.name = strdup(state->host)) ||
         !(src->dir = strdup(path))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     src->format = VIR_STORAGE_POOL_NETFS_NFS;
@@ -228,7 +228,7 @@ virStorageBackendFileSystemNetFindPoolSources(virConnectPtr conn,
 
     retval = virStoragePoolSourceListFormat(conn, &state.list);
     if (retval == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -381,20 +381,20 @@ virStorageBackendFileSystemMount(virConnectPtr conn,
     if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
         if (pool->def->source.format == VIR_STORAGE_POOL_NETFS_GLUSTERFS) {
             if (virAsprintf(&options, "direct-io-mode=1") == -1) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 return -1;
             }
         }
         if (virAsprintf(&src, "%s:%s",
                         pool->def->source.host.name,
                         pool->def->source.dir) == -1) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
     } else {
         if ((src = strdup(pool->def->source.devices[0].path)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     }
@@ -510,7 +510,7 @@ virStorageBackendFileSystemBuild(virConnectPtr conn,
     char *p;
 
     if ((parent = strdup(pool->def->target.path)) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
     if (!(p = strrchr(parent, '/'))) {
@@ -676,7 +676,7 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     /* fallthrough */
 
  cleanup:
@@ -746,7 +746,7 @@ virStorageBackendFileSystemDelete(virConnectPtr conn,
  * function), and can drop the parent pool lock during the (slow) allocation.
  */
 static int
-virStorageBackendFileSystemVolCreate(virConnectPtr conn,
+virStorageBackendFileSystemVolCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
                                      virStoragePoolObjPtr pool,
                                      virStorageVolDefPtr vol)
 {
@@ -757,14 +757,14 @@ virStorageBackendFileSystemVolCreate(virConnectPtr conn,
     if (virAsprintf(&vol->target.path, "%s/%s",
                     pool->def->target.path,
                     vol->name) == -1) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
     VIR_FREE(vol->key);
     vol->key = strdup(vol->target.path);
     if (vol->key == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -914,7 +914,7 @@ virStorageBackendFileSystemVolRefresh(virConnectPtr conn,
             if (VIR_ALLOC_N(vol->target.encryption->secrets, 1) < 0 ||
                 VIR_ALLOC(encsec) < 0) {
                 VIR_FREE(vol->target.encryption->secrets);
-                virReportOOMError(conn);
+                virReportOOMError();
                 virSecretFree(sec);
                 return -1;
             }
diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
index 0d3c7b1..74e63f3 100644
--- a/src/storage/storage_backend_iscsi.c
+++ b/src/storage/storage_backend_iscsi.c
@@ -90,7 +90,7 @@ virStorageBackendISCSITargetIP(virConnectPtr conn,
 }
 
 static int
-virStorageBackendISCSIExtractSession(virConnectPtr conn,
+virStorageBackendISCSIExtractSession(virConnectPtr conn ATTRIBUTE_UNUSED,
                                      virStoragePoolObjPtr pool,
                                      char **const groups,
                                      void *data)
@@ -99,7 +99,7 @@ virStorageBackendISCSIExtractSession(virConnectPtr conn,
 
     if (STREQ(groups[1], pool->def->source.devices[0].path)) {
         if ((*session = strdup(groups[0])) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
     }
@@ -223,7 +223,7 @@ virStorageBackendIQNFound(virConnectPtr conn,
             *ifacename = strdup(token);
             if (*ifacename == NULL) {
                 ret = IQN_ERROR;
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto out;
             }
             VIR_DEBUG("Found interface '%s' with IQN '%s'", *ifacename, iqn);
@@ -487,7 +487,7 @@ virStorageBackendISCSIPortal(virConnectPtr conn,
         return NULL;
 
     if (VIR_ALLOC_N(portal, strlen(ipaddr) + 1 + 4 + 2 + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index c2e74a5..8caf8cb 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -85,21 +85,21 @@ virStorageBackendLogicalMakeVol(virConnectPtr conn,
     /* Or a completely new volume */
     if (vol == NULL) {
         if (VIR_ALLOC(vol) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
         vol->type = VIR_STORAGE_VOL_BLOCK;
 
         if ((vol->name = strdup(groups[0])) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             virStorageVolDefFree(vol);
             return -1;
         }
 
         if (VIR_REALLOC_N(pool->volumes.objs,
                           pool->volumes.count + 1)) {
-            virReportOOMError(conn);
+            virReportOOMError();
             virStorageVolDefFree(vol);
             return -1;
         }
@@ -109,7 +109,7 @@ virStorageBackendLogicalMakeVol(virConnectPtr conn,
     if (vol->target.path == NULL) {
         if (virAsprintf(&vol->target.path, "%s/%s",
                         pool->def->target.path, vol->name) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             virStorageVolDefFree(vol);
             return -1;
         }
@@ -118,7 +118,7 @@ virStorageBackendLogicalMakeVol(virConnectPtr conn,
     if (groups[1] && !STREQ(groups[1], "")) {
         if (virAsprintf(&vol->backingStore.path, "%s/%s",
                         pool->def->target.path, groups[1]) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             virStorageVolDefFree(vol);
             return -1;
         }
@@ -128,7 +128,7 @@ virStorageBackendLogicalMakeVol(virConnectPtr conn,
 
     if (vol->key == NULL &&
         (vol->key = strdup(groups[2])) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -139,13 +139,13 @@ virStorageBackendLogicalMakeVol(virConnectPtr conn,
     /* Finally fill in extents information */
     if (VIR_REALLOC_N(vol->source.extents,
                       vol->source.nextent + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
     if ((vol->source.extents[vol->source.nextent].path =
          strdup(groups[3])) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -266,7 +266,7 @@ virStorageBackendLogicalFindPoolSourcesFunc(virConnectPtr conn,
     vgname = strdup(groups[1]);
 
     if (pvname == NULL || vgname == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err_no_memory;
     }
 
@@ -289,7 +289,7 @@ virStorageBackendLogicalFindPoolSourcesFunc(virConnectPtr conn,
         VIR_FREE(vgname);
 
     if (VIR_REALLOC_N(thisSource->devices, thisSource->ndevice + 1) != 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto err_no_memory;
     }
 
@@ -390,7 +390,7 @@ virStorageBackendLogicalBuildPool(virConnectPtr conn,
     memset(zeros, 0, sizeof(zeros));
 
     if (VIR_ALLOC_N(vgargv, 3 + pool->def->source.ndevice) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -603,7 +603,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
     if (virAsprintf(&vol->target.path, "%s/%s",
                     pool->def->target.path,
                     vol->name) == -1) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c
index fcc38ba..029ff3b 100644
--- a/src/storage/storage_backend_mpath.c
+++ b/src/storage/storage_backend_mpath.c
@@ -98,19 +98,19 @@ virStorageBackendMpathNewVol(virConnectPtr conn,
     int ret = -1;
 
     if (VIR_ALLOC(vol) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     vol->type = VIR_STORAGE_VOL_BLOCK;
 
     if (virAsprintf(&(vol->name), "dm-%u", devnum) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&vol->target.path, "/dev/%s", dev) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -128,13 +128,13 @@ virStorageBackendMpathNewVol(virConnectPtr conn,
     /* XXX should use logical unit's UUID instead */
     vol->key = strdup(vol->target.path);
     if (vol->key == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_REALLOC_N(pool->volumes.objs,
                       pool->volumes.count + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     pool->volumes.objs[pool->volumes.count++] = vol;
@@ -253,7 +253,7 @@ virStorageBackendCreateVols(virConnectPtr conn,
         if (is_mpath == 1) {
 
             if (virAsprintf(&map_device, "mapper/%s", names->name) < 0) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 retval = -1;
                 goto out;
             }
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index 4b181d7..1405f10 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -55,7 +55,7 @@ getDeviceType(virConnectPtr conn,
 
     if (virAsprintf(&type_path, "/sys/bus/scsi/devices/%u:%u:%u:%u/type",
                     host, bus, target, lun) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto out;
     }
 
@@ -206,7 +206,7 @@ virStorageBackendSCSINewLun(virConnectPtr conn,
     int retval = 0;
 
     if (VIR_ALLOC(vol) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
@@ -214,13 +214,13 @@ virStorageBackendSCSINewLun(virConnectPtr conn,
     vol->type = VIR_STORAGE_VOL_BLOCK;
 
     if (virAsprintf(&(vol->name), "%u.%u.%u.%u", host, bus, target, lun) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto free_vol;
     }
 
     if (virAsprintf(&devpath, "/dev/%s", dev) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto free_vol;
     }
@@ -266,7 +266,7 @@ virStorageBackendSCSINewLun(virConnectPtr conn,
     /* XXX should use logical unit's UUID instead */
     vol->key = strdup(vol->target.path);
     if (vol->key == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto free_vol;
     }
@@ -276,7 +276,7 @@ virStorageBackendSCSINewLun(virConnectPtr conn,
 
     if (VIR_REALLOC_N(pool->volumes.objs,
                       pool->volumes.count + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto free_vol;
     }
@@ -304,7 +304,7 @@ getNewStyleBlockDevice(virConnectPtr conn,
     int retval = 0;
 
     if (virAsprintf(&block_path, "%s/block", lun_path) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto out;
     }
 
@@ -328,7 +328,7 @@ getNewStyleBlockDevice(virConnectPtr conn,
         *block_device = strdup(block_dirent->d_name);
 
         if (*block_device == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             closedir(block_dir);
             retval = -1;
             goto out;
@@ -369,7 +369,7 @@ getOldStyleBlockDevice(virConnectPtr conn,
         *block_device = strdup(blockp);
 
         if (*block_device == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             retval = -1;
             goto out;
         }
@@ -397,7 +397,7 @@ getBlockDevice(virConnectPtr conn,
 
     if (virAsprintf(&lun_path, "/sys/bus/scsi/devices/%u:%u:%u:%u",
                     host, bus, target, lun) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto out;
     }
 
@@ -512,7 +512,7 @@ virStorageBackendSCSIFindLUs(virConnectPtr conn,
     virFileWaitForDevices(conn);
 
     if (virAsprintf(&device_path, "/sys/bus/scsi/devices") < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto out;
     }
 
@@ -596,7 +596,7 @@ virStorageBackendSCSITriggerRescan(virConnectPtr conn,
     VIR_DEBUG(_("Triggering rescan of host %d"), host);
 
     if (virAsprintf(&path, "/sys/class/scsi_host/host%u/scan", host) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         retval = -1;
         goto out;
     }
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 37be77d..0c805da 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -172,7 +172,7 @@ storageDriverStartup(int privileged) {
     return 0;
 
 out_of_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
 error:
     VIR_FREE(base);
     storageDriverUnlock(driverState);
@@ -358,7 +358,7 @@ storageListPools(virConnectPtr conn,
         if (virStoragePoolObjIsActive(driver->pools.objs[i])) {
             if (!(names[got] = strdup(driver->pools.objs[i]->def->name))) {
                 virStoragePoolObjUnlock(driver->pools.objs[i]);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             got++;
@@ -406,7 +406,7 @@ storageListDefinedPools(virConnectPtr conn,
         if (!virStoragePoolObjIsActive(driver->pools.objs[i])) {
             if (!(names[got] = strdup(driver->pools.objs[i]->def->name))) {
                 virStoragePoolObjUnlock(driver->pools.objs[i]);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             got++;
@@ -1104,7 +1104,7 @@ storagePoolListVolumes(virStoragePoolPtr obj,
 
     for (i = 0 ; i < pool->volumes.count && n < maxnames ; i++) {
         if ((names[n++] = strdup(pool->volumes.objs[i]->name)) == NULL) {
-            virReportOOMError(obj->conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -1288,7 +1288,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj,
 
     if (VIR_REALLOC_N(pool->volumes.objs,
                       pool->volumes.count+1) < 0) {
-        virReportOOMError(obj->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1312,7 +1312,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj,
         virStorageVolDefPtr buildvoldef = NULL;
 
         if (VIR_ALLOC(buildvoldef) < 0) {
-            virReportOOMError(obj->conn);
+            virReportOOMError();
             voldef = NULL;
             goto cleanup;
         }
@@ -1457,7 +1457,7 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
 
     if (VIR_REALLOC_N(pool->volumes.objs,
                       pool->volumes.count+1) < 0) {
-        virReportOOMError(obj->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1737,7 +1737,7 @@ storageVolumeGetPath(virStorageVolPtr obj) {
 
     ret = strdup(vol->target.path);
     if (ret == NULL)
-        virReportOOMError(obj->conn);
+        virReportOOMError();
 
 cleanup:
     if (pool)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 2122a1b..52e8eec 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -208,7 +208,7 @@ testBuildCapabilities(virConnectPtr conn) {
     return caps;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     virCapabilitiesFree(caps);
     return NULL;
 }
@@ -301,8 +301,7 @@ static const char *defaultNodeXML =
 static const unsigned long long defaultPoolCap = (100 * 1024 * 1024 * 1024ull);
 static const unsigned long long defaultPoolAlloc = 0;
 
-static int testStoragePoolObjSetDefaults(virConnectPtr conn,
-                                         virStoragePoolObjPtr pool);
+static int testStoragePoolObjSetDefaults(virStoragePoolObjPtr pool);
 static int testNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info);
 
 static char *
@@ -316,7 +315,7 @@ testDomainGenerateIfname(virConnectPtr conn,
         int found = 0;
 
         if (virAsprintf(&ifname, "testnet%d", ifctr) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
 
@@ -423,12 +422,12 @@ testDomainUpdateVCPUs(virConnectPtr conn,
     cpumaplen = VIR_CPU_MAPLEN(maxcpu);
 
     if (VIR_REALLOC_N(privdata->vcpu_infos, nvcpus) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_REALLOC_N(privdata->cpumaps, nvcpus * cpumaplen) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -501,7 +500,7 @@ static int testOpenDefault(virConnectPtr conn) {
     virNodeDeviceObjPtr nodeobj = NULL;
 
     if (VIR_ALLOC(privconn) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
     if (virMutexInit(&privconn->lock) < 0) {
@@ -587,7 +586,7 @@ static int testOpenDefault(virConnectPtr conn) {
         goto error;
     }
 
-    if (testStoragePoolObjSetDefaults(conn, poolobj) == -1) {
+    if (testStoragePoolObjSetDefaults(poolobj) == -1) {
         virStoragePoolObjUnlock(poolobj);
         goto error;
     }
@@ -662,7 +661,7 @@ static int testOpenVolumesForPool(virConnectPtr conn,
 
     /* Find storage volumes */
     if (virAsprintf(&vol_xpath, "/node/pool[%d]/volume", poolidx) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto error;
     }
 
@@ -698,20 +697,20 @@ static int testOpenVolumesForPool(virConnectPtr conn,
 
         if (VIR_REALLOC_N(pool->volumes.objs,
                           pool->volumes.count+1) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
         if (virAsprintf(&def->target.path, "%s/%s",
                         pool->def->target.path,
                         def->name) == -1) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
         def->key = strdup(def->target.path);
         if (def->key == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -746,7 +745,7 @@ static int testOpenFromFile(virConnectPtr conn,
     virDomainObjPtr dom;
     testConnPtr privconn;
     if (VIR_ALLOC(privconn) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
     if (virMutexInit(&privconn->lock) < 0) {
@@ -1026,7 +1025,7 @@ static int testOpenFromFile(virConnectPtr conn,
             goto error;
         }
 
-        if (testStoragePoolObjSetDefaults(conn, pool) == -1) {
+        if (testStoragePoolObjSetDefaults(pool) == -1) {
             virStoragePoolObjUnlock(pool);
             goto error;
         }
@@ -1142,7 +1141,7 @@ static virDrvOpenStatus testOpen(virConnectPtr conn,
         /* Init callback list */
         if (VIR_ALLOC(privconn->domainEventCallbacks) < 0 ||
             !(privconn->domainEventQueue = virDomainEventQueueNew())) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             testDriverUnlock(privconn);
             testClose(conn);
             return VIR_DRV_OPEN_ERROR;
@@ -1222,7 +1221,7 @@ static char *testGetCapabilities (virConnectPtr conn)
     char *xml;
     testDriverLock(privconn);
     if ((xml = virCapabilitiesFormatXML(privconn->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
     testDriverUnlock(privconn);
     return xml;
 }
@@ -1826,7 +1825,7 @@ static int testDomainRestore(virConnectPtr conn,
         goto cleanup;
     }
     if (VIR_ALLOC_N(xml, len+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
     if (saferead(fd, xml, len) != len) {
@@ -1935,10 +1934,10 @@ cleanup:
     return ret;
 }
 
-static char *testGetOSType(virDomainPtr dom) {
+static char *testGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
     char *ret = strdup("linux");
     if (!ret)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
     return ret;
 }
 
@@ -2481,7 +2480,7 @@ cleanup:
     return ret;
 }
 
-static char *testDomainGetSchedulerType(virDomainPtr domain,
+static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
                                         int *nparams)
 {
     char *type = NULL;
@@ -2489,7 +2488,7 @@ static char *testDomainGetSchedulerType(virDomainPtr domain,
     *nparams = 1;
     type = strdup("fair");
     if (!type)
-        virReportOOMError(domain->conn);
+        virReportOOMError();
 
     return type;
 }
@@ -2783,7 +2782,7 @@ static int testListNetworks(virConnectPtr conn, char **const names, int nnames)
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -2826,7 +2825,7 @@ static int testListDefinedNetworks(virConnectPtr conn, char **const names, int n
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -3064,7 +3063,7 @@ static char *testNetworkGetBridgeName(virNetworkPtr network) {
     }
 
     if (!(bridge = strdup(privnet->def->bridge))) {
-        virReportOOMError(network->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -3186,7 +3185,7 @@ static int testListInterfaces(virConnectPtr conn, char **const names, int nnames
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -3232,7 +3231,7 @@ static int testListDefinedInterfaces(virConnectPtr conn, char **const names, int
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -3460,8 +3459,7 @@ cleanup:
  */
 
 
-static int testStoragePoolObjSetDefaults(virConnectPtr conn,
-                                         virStoragePoolObjPtr pool) {
+static int testStoragePoolObjSetDefaults(virStoragePoolObjPtr pool) {
 
     pool->def->capacity = defaultPoolCap;
     pool->def->allocation = defaultPoolAlloc;
@@ -3469,7 +3467,7 @@ static int testStoragePoolObjSetDefaults(virConnectPtr conn,
 
     pool->configFile = strdup("\0");
     if (!pool->configFile) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -3582,7 +3580,7 @@ testStorageListPools(virConnectPtr conn,
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -3629,7 +3627,7 @@ testStorageListDefinedPools(virConnectPtr conn,
     return n;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     for (n = 0 ; n < nnames ; n++)
         VIR_FREE(names[n]);
     testDriverUnlock(privconn);
@@ -3741,7 +3739,7 @@ testStorageFindPoolSources(virConnectPtr conn,
     case VIR_STORAGE_POOL_LOGICAL:
         ret = strdup(defaultPoolSourcesLogicalXML);
         if (!ret)
-            virReportOOMError(conn);
+            virReportOOMError();
         break;
 
     case VIR_STORAGE_POOL_NETFS:
@@ -3753,7 +3751,7 @@ testStorageFindPoolSources(virConnectPtr conn,
 
         if (virAsprintf(&ret, defaultPoolSourcesNetFSXML,
                         source->host.name) < 0)
-            virReportOOMError(conn);
+            virReportOOMError();
         break;
 
     default:
@@ -3793,7 +3791,7 @@ testStoragePoolCreate(virConnectPtr conn,
         goto cleanup;
     def = NULL;
 
-    if (testStoragePoolObjSetDefaults(conn, pool) == -1) {
+    if (testStoragePoolObjSetDefaults(pool) == -1) {
         virStoragePoolObjRemove(&privconn->pools, pool);
         pool = NULL;
         goto cleanup;
@@ -3831,7 +3829,7 @@ testStoragePoolDefine(virConnectPtr conn,
         goto cleanup;
     def = NULL;
 
-    if (testStoragePoolObjSetDefaults(conn, pool) == -1) {
+    if (testStoragePoolObjSetDefaults(pool) == -1) {
         virStoragePoolObjRemove(&privconn->pools, pool);
         pool = NULL;
         goto cleanup;
@@ -4190,7 +4188,7 @@ testStoragePoolListVolumes(virStoragePoolPtr pool,
 
     for (i = 0 ; i < privpool->volumes.count && n < maxnames ; i++) {
         if ((names[n++] = strdup(privpool->volumes.objs[i]->name)) == NULL) {
-            virReportOOMError(pool->conn);
+            virReportOOMError();
             goto cleanup;
         }
     }
@@ -4366,20 +4364,20 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool,
 
     if (VIR_REALLOC_N(privpool->volumes.objs,
                       privpool->volumes.count+1) < 0) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&privvol->target.path, "%s/%s",
                     privpool->def->target.path,
                     privvol->name) == -1) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     privvol->key = strdup(privvol->target.path);
     if (privvol->key == NULL) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4457,20 +4455,20 @@ testStorageVolumeCreateXMLFrom(virStoragePoolPtr pool,
 
     if (VIR_REALLOC_N(privpool->volumes.objs,
                       privpool->volumes.count+1) < 0) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&privvol->target.path, "%s/%s",
                     privpool->def->target.path,
                     privvol->name) == -1) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     privvol->key = strdup(privvol->target.path);
     if (privvol->key == NULL) {
-        virReportOOMError(pool->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -4691,7 +4689,7 @@ testStorageVolumeGetPath(virStorageVolPtr vol) {
 
     ret = strdup(privvol->target.path);
     if (ret == NULL)
-        virReportOOMError(vol->conn);
+        virReportOOMError();
 
 cleanup:
     if (privpool)
@@ -4842,7 +4840,7 @@ testNodeDeviceGetParent(virNodeDevicePtr dev)
     if (obj->def->parent) {
         ret = strdup(obj->def->parent);
         if (!ret)
-            virReportOOMError(dev->conn);
+            virReportOOMError();
     } else {
         virNodeDeviceReportError(dev->conn, VIR_ERR_INTERNAL_ERROR,
                                  "%s", _("no parent for this device"));
@@ -4961,7 +4959,7 @@ testNodeDeviceCreateXML(virConnectPtr conn,
      * we don't have. Use WWPN instead. */
     VIR_FREE(def->name);
     if (!(def->name = strdup(wwpn))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -5017,7 +5015,7 @@ testNodeDeviceDestroy(virNodeDevicePtr dev)
 
     parent_name = strdup(obj->def->parent);
     if (parent_name == NULL) {
-        virReportOOMError(dev->conn);
+        virReportOOMError();
         goto out;
     }
 
diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
index 895a94d..d0aa219 100644
--- a/src/uml/uml_conf.c
+++ b/src/uml/uml_conf.c
@@ -152,7 +152,7 @@ umlConnectTapDevice(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     brShutdown(brctl);
     return -1;
@@ -257,7 +257,7 @@ umlBuildCommandLineNet(virConnectPtr conn,
     }
 
     if (virBufferError(&buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -278,14 +278,14 @@ umlBuildCommandLineChr(virConnectPtr conn,
     switch (def->type) {
     case VIR_DOMAIN_CHR_TYPE_NULL:
         if (virAsprintf(&ret, "%s%d=null", dev, def->target.port) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
         break;
 
     case VIR_DOMAIN_CHR_TYPE_PTY:
         if (virAsprintf(&ret, "%s%d=pts", dev, def->target.port) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
         break;
@@ -293,14 +293,14 @@ umlBuildCommandLineChr(virConnectPtr conn,
     case VIR_DOMAIN_CHR_TYPE_DEV:
         if (virAsprintf(&ret, "%s%d=tty:%s", dev, def->target.port,
                         def->data.file.path) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
         break;
 
     case VIR_DOMAIN_CHR_TYPE_STDIO:
         if (virAsprintf(&ret, "%s%d=fd:0,fd:1", dev, def->target.port) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
         break;
@@ -314,7 +314,7 @@ umlBuildCommandLineChr(virConnectPtr conn,
 
         if (virAsprintf(&ret, "%s%d=port:%s", dev, def->target.port,
                         def->data.tcp.service) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return NULL;
         }
         break;
@@ -534,7 +534,7 @@ int umlBuildCommandLine(virConnectPtr conn,
     return 0;
 
  no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
  error:
 
     if (qargv) {
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 31cea5c..2152dbf 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -189,8 +189,7 @@ umlAutostartConfigs(struct uml_driver *driver) {
 
 
 static int
-umlIdentifyOneChrPTY(virConnectPtr conn,
-                     struct uml_driver *driver,
+umlIdentifyOneChrPTY(struct uml_driver *driver,
                      virDomainObjPtr dom,
                      virDomainChrDefPtr def,
                      const char *dev)
@@ -199,7 +198,7 @@ umlIdentifyOneChrPTY(virConnectPtr conn,
     char *res = NULL;
     int retries = 0;
     if (virAsprintf(&cmd, "config %s%d", dev, def->target.port) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 requery:
@@ -209,7 +208,7 @@ requery:
     if (res && STRPREFIX(res, "pts:")) {
         VIR_FREE(def->data.file.path);
         if ((def->data.file.path = strdup(res + 4)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             VIR_FREE(res);
             VIR_FREE(cmd);
             return -1;
@@ -231,21 +230,20 @@ requery:
 }
 
 static int
-umlIdentifyChrPTY(virConnectPtr conn,
-                  struct uml_driver *driver,
+umlIdentifyChrPTY(struct uml_driver *driver,
                   virDomainObjPtr dom)
 {
     int i;
 
     if (dom->def->console &&
         dom->def->console->type == VIR_DOMAIN_CHR_TYPE_PTY)
-        if (umlIdentifyOneChrPTY(conn, driver, dom,
+        if (umlIdentifyOneChrPTY(driver, dom,
                                  dom->def->console, "con") < 0)
             return -1;
 
     for (i = 0 ; i < dom->def->nserials; i++)
         if (dom->def->serials[i]->type == VIR_DOMAIN_CHR_TYPE_PTY &&
-            umlIdentifyOneChrPTY(conn, driver, dom,
+            umlIdentifyOneChrPTY(driver, dom,
                                  dom->def->serials[i], "ssl") < 0)
             return -1;
 
@@ -326,7 +324,7 @@ reread:
             if (umlOpenMonitor(NULL, driver, dom) < 0) {
                 VIR_WARN0("Could not open monitor for new domain");
                 umlShutdownVMDaemon(NULL, driver, dom);
-            } else if (umlIdentifyChrPTY(NULL, driver, dom) < 0) {
+            } else if (umlIdentifyChrPTY(driver, dom) < 0) {
                 VIR_WARN0("Could not identify charater devices for new domain");
                 umlShutdownVMDaemon(NULL, driver, dom);
             }
@@ -573,7 +571,7 @@ static int umlReadPidFile(virConnectPtr conn,
     vm->pid = -1;
     if (virAsprintf(&pidfile, "%s/%s/pid",
                     driver->monitorDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -616,7 +614,7 @@ static int umlMonitorAddress(virConnectPtr conn,
 
     if (virAsprintf(&sockname, "%s/%s/mconsole",
                     driver->monitorDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -749,7 +747,7 @@ static int umlMonitorCommand(virConnectPtr conn,
         }
 
         if (VIR_REALLOC_N(retdata, retlen + res.length) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
         memcpy(retdata + retlen, res.data, res.length);
@@ -849,7 +847,7 @@ static int umlStartVMDaemon(virConnectPtr conn,
 
     if (virAsprintf(&logfile, "%s/%s.log",
                     driver->logDir, vm->def->name) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -976,7 +974,7 @@ static virDrvOpenStatus umlOpen(virConnectPtr conn,
                                 "uml:///system" :
                                 "uml:///session");
         if (!conn->uri) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
@@ -1053,7 +1051,7 @@ static char *umlGetCapabilities(virConnectPtr conn) {
 
     umlDriverLock(driver);
     if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
     umlDriverUnlock(driver);
 
     return xml;
@@ -1376,7 +1374,7 @@ static char *umlDomainGetOSType(virDomainPtr dom) {
     }
 
     if (!(type = strdup(vm->def->os.type)))
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
 cleanup:
     if (vm)
diff --git a/src/util/conf.c b/src/util/conf.c
index 60cf0b4..24588c2 100644
--- a/src/util/conf.c
+++ b/src/util/conf.c
@@ -164,7 +164,7 @@ virConfNew(void)
     virConfPtr ret;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return(NULL);
     }
     ret->filename = NULL;
@@ -216,7 +216,7 @@ virConfAddEntry(virConfPtr conf, char *name, virConfValuePtr value, char *comm)
         return(NULL);
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return(NULL);
     }
 
@@ -389,7 +389,7 @@ virConfParseString(virConfParserCtxtPtr ctxt)
         }
         ret = strndup(base, ctxt->cur - base);
         if (ret == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return NULL;
         }
         NEXT;
@@ -409,7 +409,7 @@ virConfParseString(virConfParserCtxtPtr ctxt)
         }
         ret = strndup(base, ctxt->cur - base);
         if (ret == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return NULL;
         }
         ctxt->cur += 3;
@@ -424,7 +424,7 @@ virConfParseString(virConfParserCtxtPtr ctxt)
         }
         ret = strndup(base, ctxt->cur - base);
         if (ret == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return NULL;
         }
         NEXT;
@@ -517,7 +517,7 @@ virConfParseValue(virConfParserCtxtPtr ctxt)
         return(NULL);
     }
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         virConfFreeList(lst);
         VIR_FREE(str);
         return(NULL);
@@ -558,7 +558,7 @@ virConfParseName(virConfParserCtxtPtr ctxt)
         NEXT;
     ret = strndup(base, ctxt->cur - base);
     if (ret == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return(NULL);
     }
     return(ret);
@@ -585,7 +585,7 @@ virConfParseComment(virConfParserCtxtPtr ctxt)
     while ((ctxt->cur < ctxt->end) && (!IS_EOL(CUR))) NEXT;
     comm = strndup(base, ctxt->cur - base);
     if (comm == NULL) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return(-1);
     }
     virConfAddEntry(ctxt->conf, NULL, NULL, comm);
@@ -660,7 +660,7 @@ virConfParseStatement(virConfParserCtxtPtr ctxt)
         while ((ctxt->cur < ctxt->end) && (!IS_EOL(CUR))) NEXT;
         comm = strndup(base, ctxt->cur - base);
         if (comm == NULL) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             VIR_FREE(name);
             virConfFreeValue(value);
             return(-1);
@@ -872,13 +872,13 @@ virConfSetValue (virConfPtr conf,
 
     if (!cur) {
         if (VIR_ALLOC(cur) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFreeValue(value);
             return (-1);
         }
         cur->comment = NULL;
         if (!(cur->name = strdup(setting))) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             virConfFreeValue(value);
             VIR_FREE(cur);
             return (-1);
@@ -931,7 +931,7 @@ virConfWriteFile(const char *filename, virConfPtr conf)
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -987,7 +987,7 @@ virConfWriteMem(char *memory, int *len, virConfPtr conf)
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/util/hostusb.c b/src/util/hostusb.c
index 71f6435..11a0426 100644
--- a/src/util/hostusb.c
+++ b/src/util/hostusb.c
@@ -69,7 +69,7 @@ static int usbSysReadFile(virConnectPtr conn,
 
     tmp = virAsprintf(&filename, USB_SYSFS "/devices/%s/%s", d_name, f_name);
     if (tmp < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -169,7 +169,7 @@ usbGetDevice(virConnectPtr conn,
     usbDevice *dev;
 
     if (VIR_ALLOC(dev) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
diff --git a/src/util/json.c b/src/util/json.c
index 1b3c359..62bf8e2 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -1010,17 +1010,17 @@ char *virJSONValueToString(virJSONValuePtr object)
     g = yajl_gen_alloc(&conf, NULL);
 
     if (virJSONValueToStringOne(object, g) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (yajl_gen_get_buf(g, &str, &len) != yajl_gen_status_ok) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (!(ret = strdup((const char *)str)))
-        virReportOOMError(NULL);
+        virReportOOMError();
 
 cleanup:
     yajl_gen_free(g);
diff --git a/src/util/pci.c b/src/util/pci.c
index 0274806..12e6e91 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -1016,7 +1016,7 @@ pciGetDevice(virConnectPtr conn,
     char *vendor, *product;
 
     if (VIR_ALLOC(dev) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1077,12 +1077,12 @@ unsigned pciDeviceGetManaged(pciDevice *dev)
 }
 
 pciDeviceList *
-pciDeviceListNew(virConnectPtr conn)
+pciDeviceListNew(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/)
 {
     pciDeviceList *list;
 
     if (VIR_ALLOC(list) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1120,7 +1120,7 @@ pciDeviceListAdd(virConnectPtr conn,
     }
 
     if (VIR_REALLOC_N(list->devs, list->count+1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -1216,7 +1216,7 @@ int pciDeviceFileIterate(virConnectPtr conn,
 
     if (virAsprintf(&pcidir, "/sys/bus/pci/devices/%04x:%02x:%02x.%x",
                     dev->domain, dev->bus, dev->slot, dev->function) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1234,7 +1234,7 @@ int pciDeviceFileIterate(virConnectPtr conn,
             STRPREFIX(ent->d_name, "resource") ||
             STREQ(ent->d_name, "rom")) {
             if (virAsprintf(&file, "%s/%s", pcidir, ent->d_name) < 0) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
             if ((actor)(conn, dev, file, opaque) < 0)
diff --git a/src/util/processinfo.c b/src/util/processinfo.c
index 397848e..66efa8b 100644
--- a/src/util/processinfo.c
+++ b/src/util/processinfo.c
@@ -56,7 +56,7 @@ realloc:
     mask = CPU_ALLOC(numcpus);
 
     if (!mask) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -122,7 +122,7 @@ realloc:
     mask = CPU_ALLOC(numcpus);
 
     if (!mask) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/util/qparams.c b/src/util/qparams.c
index 9b96c2a..9535ca4 100644
--- a/src/util/qparams.c
+++ b/src/util/qparams.c
@@ -45,14 +45,14 @@ new_qparam_set (int init_alloc, ...)
     if (init_alloc <= 0) init_alloc = 1;
 
     if (VIR_ALLOC(ps) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
     ps->n = 0;
     ps->alloc = init_alloc;
     if (VIR_ALLOC_N(ps->p, ps->alloc) < 0) {
         VIR_FREE (ps);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -96,7 +96,7 @@ grow_qparam_set (struct qparam_set *ps)
 {
     if (ps->n >= ps->alloc) {
         if (VIR_REALLOC_N(ps->p, ps->alloc * 2) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
         ps->alloc *= 2;
@@ -113,14 +113,14 @@ append_qparam (struct qparam_set *ps,
 
     pname = strdup (name);
     if (!pname) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
     pvalue = strdup (value);
     if (!pvalue) {
         VIR_FREE (pname);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -155,7 +155,7 @@ qparam_get_query (const struct qparam_set *ps)
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -183,7 +183,7 @@ qparam_query_parse (const char *query)
 
     ps = new_qparam_set (0, NULL);
     if (!ps) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -256,7 +256,7 @@ qparam_query_parse (const char *query)
     return ps;
 
  out_of_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     free_qparam_set (ps);
     return NULL;
 }
diff --git a/src/util/storage_file.c b/src/util/storage_file.c
index 44057d2..1a490ba 100644
--- a/src/util/storage_file.c
+++ b/src/util/storage_file.c
@@ -139,7 +139,7 @@ static struct FileTypeInfo const fileTypeInfo[] = {
 };
 
 static int
-cowGetBackingStore(virConnectPtr conn,
+cowGetBackingStore(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                    char **res,
                    const unsigned char *buf,
                    size_t buf_size)
@@ -153,14 +153,14 @@ cowGetBackingStore(virConnectPtr conn,
 
     *res = strndup ((const char*)buf + 4+4, COW_FILENAME_MAXLEN);
     if (*res == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return BACKING_STORE_ERROR;
     }
     return BACKING_STORE_OK;
 }
 
 static int
-qcowXGetBackingStore(virConnectPtr conn,
+qcowXGetBackingStore(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                      char **res,
                      const unsigned char *buf,
                      size_t buf_size)
@@ -192,7 +192,7 @@ qcowXGetBackingStore(virConnectPtr conn,
     if (size + 1 == 0)
         return BACKING_STORE_INVALID;
     if (VIR_ALLOC_N(*res, size + 1) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return BACKING_STORE_ERROR;
     }
     memcpy(*res, buf + offset, size);
@@ -202,7 +202,7 @@ qcowXGetBackingStore(virConnectPtr conn,
 
 
 static int
-vmdk4GetBackingStore(virConnectPtr conn,
+vmdk4GetBackingStore(virConnectPtr conn ATTRIBUTE_UNUSED /*TEMPORARY*/,
                      char **res,
                      const unsigned char *buf,
                      size_t buf_size)
@@ -233,7 +233,7 @@ vmdk4GetBackingStore(virConnectPtr conn,
     *end = '\0';
     *res = strdup(start);
     if (*res == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return BACKING_STORE_ERROR;
     }
     return BACKING_STORE_OK;
@@ -381,7 +381,7 @@ virStorageFileGetMetadataFromFD(virConnectPtr conn,
                 meta->backingStore = absolutePathFromBaseFile(path, base);
                 VIR_FREE(base);
                 if (meta->backingStore == NULL) {
-                    virReportOOMError(conn);
+                    virReportOOMError();
                     return -1;
                 }
             }
diff --git a/src/util/util.c b/src/util/util.c
index 7e0cd50..d40a790 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -625,13 +625,13 @@ virExecWithHook(virConnectPtr conn,
     char *envp_str;
 
     if ((argv_str = virArgvToString(argv)) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
     if (envp) {
         if ((envp_str = virArgvToString(envp)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
         VIR_DEBUG("%s %s", envp_str, argv_str);
@@ -774,7 +774,7 @@ virPipeReadUntilEOF(virConnectPtr conn, int outfd, int errfd,
             buf = ((fds[i].fd == outfd) ? outbuf : errbuf);
             size = (*buf ? strlen(*buf) : 0);
             if (VIR_REALLOC_N(*buf, size+got+1) < 0) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto error;
             }
             memmove(*buf+size, data, got);
@@ -826,7 +826,7 @@ virRunWithHook(virConnectPtr conn,
     char *argv_str = NULL;
 
     if ((argv_str = virArgvToString(argv)) == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
     DEBUG0(argv_str);
@@ -2187,7 +2187,7 @@ char *virIndexToDiskName(int idx, const char *prefix)
     offset = strlen(prefix);
 
     if (VIR_ALLOC_N(name, offset + i + 1)) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2239,7 +2239,7 @@ char *virGetHostname(virConnectPtr conn)
     /* Caller frees this string. */
     result = strdup (info->ai_canonname);
     if (!result)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     freeaddrinfo(info);
     return result;
@@ -2355,7 +2355,7 @@ static char *virGetUserEnt(virConnectPtr conn,
     }
 
     if (VIR_ALLOC_N(strbuf, strbuflen) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2381,7 +2381,7 @@ static char *virGetUserEnt(virConnectPtr conn,
 
     VIR_FREE(strbuf);
     if (!ret)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return ret;
 }
@@ -2415,7 +2415,7 @@ int virGetUserID(virConnectPtr conn,
     }
 
     if (VIR_ALLOC_N(strbuf, strbuflen) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -2458,7 +2458,7 @@ int virGetGroupID(virConnectPtr conn,
     }
 
     if (VIR_ALLOC_N(strbuf, strbuflen) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/util/virterror.c b/src/util/virterror.c
index d72b307..1454ea0 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -1250,7 +1250,6 @@ void virReportSystemErrorFull(virConnectPtr conn,
 
 /**
  * virReportOOMErrorFull:
- * @conn: the hyperisor connection
  * @domcode: the virErrorDomain indicating where it's coming from
  * @filename: filename where error was raised
  * @funcname: function name where error was raised
@@ -1259,8 +1258,7 @@ void virReportSystemErrorFull(virConnectPtr conn,
  * Convenience internal routine called when an out of memory error is
  * detected
  */
-void virReportOOMErrorFull(virConnectPtr conn,
-                           int domcode,
+void virReportOOMErrorFull(int domcode,
                            const char *filename,
                            const char *funcname,
                            size_t linenr)
@@ -1268,7 +1266,7 @@ void virReportOOMErrorFull(virConnectPtr conn,
     const char *virerr;
 
     virerr = virErrorMsg(VIR_ERR_NO_MEMORY, NULL);
-    virRaiseErrorFull(conn, filename, funcname, linenr,
+    virRaiseErrorFull(NULL, filename, funcname, linenr,
                       domcode, VIR_ERR_NO_MEMORY, VIR_ERR_ERROR,
                       virerr, NULL, NULL, -1, -1, virerr, NULL);
 }
diff --git a/src/util/virterror_internal.h b/src/util/virterror_internal.h
index c713497..e4b644c 100644
--- a/src/util/virterror_internal.h
+++ b/src/util/virterror_internal.h
@@ -79,15 +79,13 @@ void virReportSystemErrorFull(virConnectPtr conn,
                              __FILE__, __FUNCTION__, __LINE__,    \
                              (fmt), __VA_ARGS__)
 
-void virReportOOMErrorFull(virConnectPtr conn,
-                           int domcode,
+void virReportOOMErrorFull(int domcode,
                            const char *filename,
                            const char *funcname,
                            size_t linenr);
 
-#define virReportOOMError(conn)                         \
-    virReportOOMErrorFull((conn), VIR_FROM_THIS,        \
-                     __FILE__, __FUNCTION__, __LINE__)
+#define virReportOOMError() \
+    virReportOOMErrorFull(VIR_FROM_THIS, __FILE__, __FUNCTION__, __LINE__)
 
 
 int virSetError(virErrorPtr newerr);
diff --git a/src/util/xml.c b/src/util/xml.c
index 4fa443d..0338373 100644
--- a/src/util/xml.c
+++ b/src/util/xml.c
@@ -71,7 +71,7 @@ virXPathString(virConnectPtr conn,
     ret = strdup((char *) obj->stringval);
     xmlXPathFreeObject(obj);
     if (ret == NULL) {
-        virReportOOMError(conn);
+        virReportOOMError();
     }
     return (ret);
 }
@@ -504,7 +504,7 @@ virXPathNodeSet(virConnectPtr conn,
     ret = obj->nodesetval->nodeNr;
     if (list != NULL && ret) {
         if (VIR_ALLOC_N(*list, ret) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             ret = -1;
         } else {
             memcpy(*list, obj->nodesetval->nodeTab,
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index e40c848..9f5e4ea 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -313,11 +313,11 @@ static bool vboxIIDEqual(vboxIID *firstIID, vboxIID *secondIID) {
         return false;
 }
 
-static void vboxIIDtoUtf8(virConnectPtr conn, vboxIID *iid, char **uuidstr) {
+static void vboxIIDtoUtf8(vboxIID *iid, char **uuidstr) {
     unsigned char hddUUID[VIR_UUID_BUFLEN];
 
     if (VIR_ALLOC_N(*uuidstr, VIR_UUID_STRING_BUFLEN) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return;
     }
 
@@ -325,11 +325,11 @@ static void vboxIIDtoUtf8(virConnectPtr conn, vboxIID *iid, char **uuidstr) {
     virUUIDFormat(hddUUID, *uuidstr);
 }
 
-static void vboxUtf8toIID(virConnectPtr conn, char *uuidstr, vboxIID **iid) {
+static void vboxUtf8toIID(char *uuidstr, vboxIID **iid) {
     unsigned char hddUUID[VIR_UUID_BUFLEN];
 
     if (VIR_ALLOC(*iid) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return;
     }
 
@@ -394,16 +394,16 @@ static bool vboxIIDEqual(vboxIID *firstIID, vboxIID *secondIID) {
         return false;
 }
 
-static void vboxIIDtoUtf8(virConnectPtr conn, vboxIID *iid, char **uuidstr) {
+static void vboxIIDtoUtf8(vboxIID *iid, char **uuidstr) {
     g_pVBoxGlobalData->pFuncs->pfnUtf16ToUtf8(iid, uuidstr);
     if (!(*uuidstr))
-        virReportOOMError(conn);
+        virReportOOMError();
 }
 
-static void vboxUtf8toIID(virConnectPtr conn, char *uuidstr, vboxIID **iid) {
+static void vboxUtf8toIID(char *uuidstr, vboxIID **iid) {
     g_pVBoxGlobalData->pFuncs->pfnUtf8ToUtf16(uuidstr, iid);
     if (!(*iid))
-        virReportOOMError(conn);
+        virReportOOMError();
 }
 
 #if VBOX_API_VERSION >= 3001
@@ -770,7 +770,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
     if (conn->uri == NULL) {
         conn->uri = xmlParseURI(uid ? "vbox:///session" : "vbox:///system");
         if (conn->uri == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     }
@@ -805,7 +805,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
     }
 
     if (VIR_ALLOC(data) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
 
@@ -823,7 +823,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
 #else  /* !(VBOX_API_VERSION == 2002) */
 
     if (VIR_ALLOC(data->domainEventCallbacks) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
 
@@ -1313,7 +1313,7 @@ static int vboxDomainSuspend(virDomainPtr dom) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1370,7 +1370,7 @@ static int vboxDomainResume(virDomainPtr dom) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1430,7 +1430,7 @@ static int vboxDomainShutdown(virDomainPtr dom) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1487,7 +1487,7 @@ static int vboxDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSE
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1540,7 +1540,7 @@ static int vboxDomainDestroy(virDomainPtr dom) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1592,7 +1592,7 @@ cleanup:
     return ret;
 }
 
-static char *vboxDomainGetOSType(virDomainPtr dom) {
+static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
     /* Returning "hvm" always as suggested on list, cause
      * this functions seems to be badly named and it
      * is supposed to pass the ABI name and not the domain
@@ -1601,7 +1601,7 @@ static char *vboxDomainGetOSType(virDomainPtr dom) {
     char *osType = strdup("hvm");
 
     if (osType == NULL)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
     return osType;
 }
@@ -1616,7 +1616,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1788,7 +1788,7 @@ static int vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) {
      */
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1840,7 +1840,7 @@ static int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -1910,13 +1910,13 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2079,11 +2079,11 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                             def->videos[0]->accel->support3d = accelerate3DEnabled;
                             def->videos[0]->accel->support2d = accelerate2DEnabled;
                         } else
-                            virReportOOMError(dom->conn);
+                            virReportOOMError();
                     } else
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                 } else
-                    virReportOOMError(dom->conn);
+                    virReportOOMError();
             }
 
             /* dump display options vrdp/gui/sdl */
@@ -2132,7 +2132,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                             if (valueDisplayUtf8)
                                 sdlDisplay = strdup(valueDisplayUtf8);
                             if (sdlDisplay == NULL) {
-                                virReportOOMError(dom->conn);
+                                virReportOOMError();
                                 /* just don't go to cleanup yet as it is ok to have
                                  * sdlDisplay as NULL and we check it below if it
                                  * exist and then only use it there
@@ -2146,7 +2146,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                             if (valueDisplayUtf8)
                                 guiDisplay = strdup(valueDisplayUtf8);
                             if (guiDisplay == NULL) {
-                                virReportOOMError(dom->conn);
+                                virReportOOMError();
                                 /* just don't go to cleanup yet as it is ok to have
                                  * guiDisplay as NULL and we check it below if it
                                  * exist and then only use it there
@@ -2183,7 +2183,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                         def->graphics[def->ngraphics]->type = VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP;
                         def->graphics[def->ngraphics]->data.desktop.display = strdup(getenv("DISPLAY"));
                         if (def->graphics[def->ngraphics]->data.desktop.display == NULL) {
-                            virReportOOMError(dom->conn);
+                            virReportOOMError();
                             /* just don't go to cleanup yet as it is ok to have
                              * display as NULL
                              */
@@ -2246,7 +2246,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
 
                             def->ngraphics++;
                         } else
-                            virReportOOMError(dom->conn);
+                            virReportOOMError();
                     }
                     VBOX_RELEASE(VRDPServer);
                 }
@@ -2278,7 +2278,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                         def->disks[i]->bus = VIR_DOMAIN_DISK_BUS_IDE;
                         def->disks[i]->type = VIR_DOMAIN_DISK_TYPE_FILE;
                     } else
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                 }
             }
 
@@ -2372,13 +2372,13 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
             if (VIR_ALLOC_N(def->disks, def->ndisks) >= 0) {
                 for (i = 0; i < def->ndisks; i++) {
                     if (VIR_ALLOC(def->disks[i]) < 0) {
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                         error = true;
                         break;
                     }
                 }
             } else {
-                virReportOOMError(dom->conn);
+                virReportOOMError();
                 error = true;
             }
 
@@ -2431,7 +2431,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                 if (!(def->disks[diskCount]->src)) {
                     VBOX_RELEASE(medium);
                     VBOX_RELEASE(storageController);
-                    virReportOOMError(dom->conn);
+                    virReportOOMError();
                     error = true;
                     break;
                 }
@@ -2524,7 +2524,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                 for (i = 0; i < def->nnets; i++) {
                     if (VIR_ALLOC(def->nets[i]) >= 0) {
                     } else
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                 }
             }
 
@@ -2663,11 +2663,11 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                         } else {
                             VIR_FREE(def->sounds);
                             def->nsounds = 0;
-                            virReportOOMError(dom->conn);
+                            virReportOOMError();
                         }
                     } else {
                         def->nsounds = 0;
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                     }
                 }
                 VBOX_RELEASE(audioAdapter);
@@ -2702,11 +2702,11 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                                 def->disks[def->ndisks - 1]->dst = strdup("hdc");
                             } else {
                                 def->ndisks--;
-                                virReportOOMError(dom->conn);
+                                virReportOOMError();
                             }
                         } else {
                             def->ndisks--;
-                            virReportOOMError(dom->conn);
+                            virReportOOMError();
                         }
 
                         VBOX_UTF8_FREE(location);
@@ -2749,11 +2749,11 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                                     def->disks[def->ndisks - 1]->dst = strdup("fda");
                                 } else {
                                     def->ndisks--;
-                                    virReportOOMError(dom->conn);
+                                    virReportOOMError();
                                 }
                             } else {
                                 def->ndisks--;
-                                virReportOOMError(dom->conn);
+                                virReportOOMError();
                             }
 
                             VBOX_UTF8_FREE(location);
@@ -2792,7 +2792,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                 for (i = 0; i < def->nserials; i++) {
                     if (VIR_ALLOC(def->serials[i]) >= 0) {
                     } else
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                 }
             }
 
@@ -2876,7 +2876,7 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
                 for (i = 0; i < def->nparallels; i++) {
                     if (VIR_ALLOC(def->parallels[i]) >= 0) {
                     } else
-                        virReportOOMError(dom->conn);
+                        virReportOOMError();
                 }
             }
 
@@ -2994,11 +2994,11 @@ static char *vboxDomainDumpXML(virDomainPtr dom, int flags) {
 
                                             USBFilterCount++;
                                         } else
-                                            virReportOOMError(dom->conn);
+                                            virReportOOMError();
                                     }
                                 }
                             } else
-                                virReportOOMError(dom->conn);
+                                virReportOOMError();
                         }
                     }
 
@@ -3062,7 +3062,7 @@ static int vboxListDefinedDomains(virConnectPtr conn, char ** const names, int m
                     machine->vtbl->GetName(machine, &machineNameUtf16);
                     VBOX_UTF16_TO_UTF8(machineNameUtf16, &machineName);
                     if (!(names[j++] = strdup(machineName))) {
-                        virReportOOMError(conn);
+                        virReportOOMError();
                         for ( ; j >= 0 ; j--)
                             VIR_FREE(names[j]);
                         ret = -1;
@@ -3362,7 +3362,7 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -4310,7 +4310,7 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
                 if (def->graphics[i]->data.desktop.display) {
                     guiDisplay = strdup(def->graphics[i]->data.desktop.display);
                     if (guiDisplay == NULL) {
-                        virReportOOMError(conn);
+                        virReportOOMError();
                         /* just don't go to cleanup yet as it is ok to have
                          * guiDisplay as NULL and we check it below if it
                          * exist and then only use it there
@@ -4324,7 +4324,7 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
                 if (def->graphics[i]->data.sdl.display) {
                     sdlDisplay = strdup(def->graphics[i]->data.sdl.display);
                     if (sdlDisplay == NULL) {
-                        virReportOOMError(conn);
+                        virReportOOMError();
                         /* just don't go to cleanup yet as it is ok to have
                          * sdlDisplay as NULL and we check it below if it
                          * exist and then only use it there
@@ -4526,7 +4526,7 @@ static int vboxDomainUndefine(virDomainPtr dom) {
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -4647,27 +4647,27 @@ static int vboxDomainAttachDevice(virDomainPtr dom, const char *xml) {
     nsresult rc;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         return ret;
     }
 
     def->os.type = strdup("hvm");
 
     if (def->os.type == NULL) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     dev = virDomainDeviceDefParse(dom->conn, data->caps, def, xml,
                                   VIR_DOMAIN_XML_INACTIVE);
     if (dev == NULL) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -4845,27 +4845,27 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) {
     nsresult rc;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         return ret;
     }
 
     def->os.type = strdup("hvm");
 
     if (def->os.type == NULL) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     dev = virDomainDeviceDefParse(dom->conn, data->caps, def, xml,
                                   VIR_DOMAIN_XML_INACTIVE);
     if (dev == NULL) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -5251,14 +5251,14 @@ static nsresult vboxCallbackQueryInterface(nsISupports *pThis, const nsID *iid,
 }
 
 
-static IVirtualBoxCallback *vboxAllocCallbackObj (virConnectPtr conn) {
+static IVirtualBoxCallback *vboxAllocCallbackObj(void) {
     IVirtualBoxCallback *vboxCallback = NULL;
 
     /* Allocate, Initialize and return a validi
      * IVirtualBoxCallback object here
      */
     if ((VIR_ALLOC(vboxCallback) < 0) || (VIR_ALLOC(vboxCallback->vtbl) < 0)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -5317,7 +5317,7 @@ static int vboxDomainEventRegister (virConnectPtr conn,
     vboxDriverLock(data);
 
     if (data->vboxCallback == NULL) {
-        data->vboxCallback = vboxAllocCallbackObj(conn);
+        data->vboxCallback = vboxAllocCallbackObj();
         if (data->vboxCallback != NULL) {
             rc = data->vboxObj->vtbl->RegisterCallback(data->vboxObj, data->vboxCallback);
             if (NS_SUCCEEDED(rc)) {
@@ -5612,7 +5612,7 @@ static virNetworkPtr vboxNetworkLookupByUUID(virConnectPtr conn, const unsigned
 
 #if VBOX_API_VERSION == 2002
     if (VIR_ALLOC(iid) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 #endif
@@ -5749,7 +5749,7 @@ static virNetworkPtr vboxNetworkDefineCreateXML(virConnectPtr conn, const char *
             if (virAsprintf(&networkNameUtf8, "HostInterfaceNetworking-%s", networkInterfaceNameUtf8) < 0) {
                 VBOX_RELEASE(host);
                 VBOX_RELEASE(networkInterface);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto cleanup;
             }
         }
@@ -5877,7 +5877,7 @@ static int vboxNetworkUndefineDestroy(virNetworkPtr network, bool removeinterfac
      */
 
     if (virAsprintf(&networkNameUtf8, "HostInterfaceNetworking-%s", network->name) < 0) {
-        virReportOOMError(network->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -5967,7 +5967,7 @@ static int vboxNetworkCreate(virNetworkPtr network) {
      */
 
     if (virAsprintf(&networkNameUtf8, "HostInterfaceNetworking-%s", network->name) < 0) {
-        virReportOOMError(network->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -6035,12 +6035,12 @@ static char *vboxNetworkDumpXML(virNetworkPtr network, int flags ATTRIBUTE_UNUSE
     char *networkNameUtf8 = NULL;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(network->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (virAsprintf(&networkNameUtf8, "HostInterfaceNetworking-%s", network->name) < 0) {
-        virReportOOMError(network->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -6099,7 +6099,7 @@ static char *vboxNetworkDumpXML(virNetworkPtr network, int flags ATTRIBUTE_UNUSE
                         VBOX_UTF16_FREE(toIPAddressUtf16);
                     } else {
                         def->nranges = 0;
-                        virReportOOMError(network->conn);
+                        virReportOOMError();
                     }
 
                     def->nhosts = 1;
@@ -6205,13 +6205,14 @@ static int vboxStorageNumOfPools(virConnectPtr conn ATTRIBUTE_UNUSED) {
     return 1;
 }
 
-static int vboxStorageListPools(virConnectPtr conn, char **const names, int nnames) {
+static int vboxStorageListPools(virConnectPtr conn ATTRIBUTE_UNUSED,
+                                char **const names, int nnames) {
     int numActive = 0;
 
     if (nnames == 1) {
         names[numActive] = strdup("default-pool");
         if (names[numActive] == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
         } else {
             numActive++;
         }
@@ -6305,7 +6306,7 @@ static int vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names
                         DEBUG("nnames[%d]: %s", numActive, nameUtf8);
                         names[numActive] = strdup(nameUtf8);
                         if (names[numActive] == NULL) {
-                            virReportOOMError(pool->conn);
+                            virReportOOMError();
                         } else {
                             numActive++;
                         }
@@ -6368,7 +6369,7 @@ static virStorageVolPtr vboxStorageVolLookupByName(virStoragePoolPtr pool, const
                         VBOX_MEDIUM_FUNC_ARG1(hardDisk, GetId, &hddIID);
 
                         if (hddIID) {
-                            vboxIIDtoUtf8(pool->conn, hddIID, &hddIIDUtf8);
+                            vboxIIDtoUtf8(hddIID, &hddIIDUtf8);
                             vboxIIDUnalloc(hddIID);
                         }
 
@@ -6413,7 +6414,7 @@ static virStorageVolPtr vboxStorageVolLookupByKey(virConnectPtr conn, const char
 #if VBOX_API_VERSION == 2002
 
     if (VIR_ALLOC(hddIID) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -6504,7 +6505,7 @@ static virStorageVolPtr vboxStorageVolLookupByPath(virConnectPtr conn, const cha
             }
 
             if (hddIID) {
-                vboxIIDtoUtf8(conn, hddIID, &hddIIDUtf8);
+                vboxIIDtoUtf8(hddIID, &hddIIDUtf8);
                 vboxIIDUnalloc(hddIID);
             }
 
@@ -6609,7 +6610,7 @@ static virStorageVolPtr vboxStorageVolCreateXML(virStoragePoolPtr pool,
                     if (NS_SUCCEEDED(rc)) {
                         char *hddKey = NULL;
 
-                        vboxIIDtoUtf8(pool->conn, hddIID, &hddKey);
+                        vboxIIDtoUtf8(hddIID, &hddKey);
 
                         if (hddKey)
                             ret = virGetStorageVol(pool->conn, pool->name, def->name, hddKey);
@@ -6643,7 +6644,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol,
     int i = 0;
     int j = 0;
 
-    vboxUtf8toIID(vol->conn, vol->key, &hddIID);
+    vboxUtf8toIID(vol->key, &hddIID);
     if (!hddIID)
         return ret;
 
@@ -6772,7 +6773,7 @@ static int vboxStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info
     if (!info)
         return ret;
 
-    vboxUtf8toIID(vol->conn, vol->key, &hddIID);
+    vboxUtf8toIID(vol->key, &hddIID);
     if (!hddIID)
         return ret;
 
@@ -6821,7 +6822,7 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags A
     memset(&pool, 0, sizeof(pool));
     memset(&def, 0, sizeof(def));
 
-    vboxUtf8toIID(vol->conn, vol->key, &hddIID);
+    vboxUtf8toIID(vol->key, &hddIID);
     if (!hddIID)
         return ret;
 
@@ -6910,7 +6911,7 @@ static char *vboxStorageVolGetPath(virStorageVolPtr vol) {
     vboxIID   *hddIID    = NULL;
     nsresult rc;
 
-    vboxUtf8toIID(vol->conn, vol->key, &hddIID);
+    vboxUtf8toIID(vol->key, &hddIID);
     if (!hddIID)
         return ret;
 
@@ -6930,7 +6931,7 @@ static char *vboxStorageVolGetPath(virStorageVolPtr vol) {
 
                 ret = strdup(hddLocationUtf8);
                 if (!ret)
-                    virReportOOMError(vol->conn);
+                    virReportOOMError();
 
                 DEBUG("Storage Volume Name: %s", vol->name);
                 DEBUG("Storage Volume Path: %s", hddLocationUtf8);
diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
index fdcaff7..8e699b1 100644
--- a/src/xen/block_stats.c
+++ b/src/xen/block_stats.c
@@ -295,7 +295,7 @@ xenLinuxDomainDeviceID(virConnectPtr conn, int domid, const char *path)
         retval = virAsprintf(&mod_path, "/dev/%s", path);
 
     if (retval < 0) {
-        virReportOOMError (conn);
+        virReportOOMError();
         return -1;
     }
 
diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c
index bde3eda..e37bce1 100644
--- a/src/xen/proxy_internal.c
+++ b/src/xen/proxy_internal.c
@@ -939,7 +939,7 @@ xenProxyGetCapabilities (virConnectPtr conn)
 
     xmllen = ans.len - sizeof (virProxyPacket);
     if (VIR_ALLOC_N(xml, xmllen+1) < 0) {
-        virReportOOMError (conn);
+        virReportOOMError();
         return NULL;
     }
     memmove (xml, ans.extra.str, xmllen);
@@ -989,7 +989,7 @@ xenProxyDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)
     }
     xmllen = ans.len - sizeof(virProxyPacket);
     if (VIR_ALLOC_N(xml, xmllen+1) < 0) {
-        virReportOOMError(domain->conn);
+        virReportOOMError();
         return NULL;
     }
     memmove(xml, &ans.extra.dinfo, xmllen);
@@ -1044,7 +1044,7 @@ xenProxyDomainGetOSType(virDomainPtr domain)
     }
     oslen = ans.len - sizeof(virProxyPacket);
     if (VIR_ALLOC_N(ostype, oslen+1) < 0) {
-        virReportOOMError(domain->conn);
+        virReportOOMError();
         return NULL;
     }
     memmove(ostype, &ans.extra.dinfo, oslen);
diff --git a/src/xen/sexpr.c b/src/xen/sexpr.c
index 085500d..2455dfa 100644
--- a/src/xen/sexpr.c
+++ b/src/xen/sexpr.c
@@ -42,7 +42,7 @@ sexpr_new(void)
     struct sexpr *ret;
 
     if (VIR_ALLOC(ret) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return (NULL);
     }
     ret->kind = SEXPR_NIL;
@@ -349,7 +349,7 @@ _string2sexpr(const char *buffer, size_t * end)
 
             ret->u.value = strndup(start, ptr - start);
             if (ret->u.value == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto error;
             }
 
@@ -365,7 +365,7 @@ _string2sexpr(const char *buffer, size_t * end)
 
             ret->u.value = strndup(start, ptr - start);
             if (ret->u.value == NULL) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 goto error;
             }
         }
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 72f56ae..c5da026 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -140,17 +140,17 @@ xenDomainUsedCpus(virDomainPtr dom)
         return(NULL);
 
     if (VIR_ALLOC_N(cpulist, priv->nbNodeCpus) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto done;
     }
     if (VIR_ALLOC_N(cpuinfo, nb_vcpu) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto done;
     }
     cpumaplen = VIR_CPU_MAPLEN(VIR_NODEINFO_MAXCPUS(nodeinfo));
     if (xalloc_oversized(nb_vcpu, cpumaplen) ||
         VIR_ALLOC_N(cpumap, nb_vcpu * cpumaplen) < 0) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto done;
     }
 
@@ -246,7 +246,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
 
         conn->uri = xmlParseURI("xen:///");
         if (!conn->uri) {
-            virReportOOMError (NULL);
+            virReportOOMError();
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
@@ -292,7 +292,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
 
     /* Allocate per-connection private data. */
     if (VIR_ALLOC(priv) < 0) {
-        virReportOOMError (NULL);
+        virReportOOMError();
         return VIR_DRV_OPEN_ERROR;
     }
     if (virMutexInit(&priv->lock) < 0) {
@@ -304,7 +304,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
 
     /* Allocate callback list */
     if (VIR_ALLOC(cbList) < 0) {
-        virReportOOMError (NULL);
+        virReportOOMError();
         virMutexDestroy(&priv->lock);
         VIR_FREE(priv);
         return VIR_DRV_OPEN_ERROR;
@@ -546,7 +546,7 @@ xenUnifiedGetCapabilities (virConnectPtr conn)
     char *xml;
 
     if (!(xml = virCapabilitiesFormatXML(priv->caps))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -816,7 +816,7 @@ xenUnifiedDomainisPersistent(virDomainPtr dom)
 
                     virUUIDFormat(dom->uuid, uuidstr);
                     if (virAsprintf(&path, "%s/%s", XEND_DOMAINS_DIR, uuidstr) < 0) {
-                        virReportOOMError(NULL);
+                        virReportOOMError();
                         goto done;
                     }
                     if (access(path, R_OK) == 0)
@@ -1237,7 +1237,7 @@ xenUnifiedDomainXMLToNative(virConnectPtr conn,
             goto cleanup;
 
         if (VIR_ALLOC_N(ret, len) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto cleanup;
         }
 
@@ -1948,7 +1948,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
     list->count++;
     return 0;
 memory_error:
-    virReportOOMError (NULL);
+    virReportOOMError();
     if (info)
         VIR_FREE(info->name);
     VIR_FREE(info);
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 16c91e1..13a5d3d 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -1173,14 +1173,14 @@ xenHypervisorGetSchedulerType(virDomainPtr domain, int *nparams)
             case XEN_SCHEDULER_SEDF:
                 schedulertype = strdup("sedf");
                 if (schedulertype == NULL)
-                    virReportOOMError(domain->conn);
+                    virReportOOMError();
                 if (nparams)
                     *nparams = 6;
                 break;
             case XEN_SCHEDULER_CREDIT:
                 schedulertype = strdup("credit");
                 if (schedulertype == NULL)
-                    virReportOOMError(domain->conn);
+                    virReportOOMError();
                 if (nparams)
                     *nparams = 2;
                 break;
@@ -1727,7 +1727,7 @@ virXen_setvcpumap(int handle, int id, unsigned int vcpu,
          * for Xen, and also nr_cpus must be 'sizeof(uint64_t) * 8'       */
         if (maplen < 8) {
             if (VIR_ALLOC_N(new, sizeof(uint64_t)) < 0) {
-                virReportOOMError(NULL);
+                virReportOOMError();
                 return (-1);
             }
             memcpy(new, cpumap, maplen);
@@ -2052,7 +2052,7 @@ xenHypervisorInit(void)
     hypervisor_version = 2;
 
     if (VIR_ALLOC(ipt) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return(-1);
     }
     /* Currently consider RHEL5.0 Fedora7, xen-3.1, and xen-unstable */
@@ -2460,7 +2460,7 @@ xenHypervisorMakeCapabilitiesSunOS(virConnectPtr conn)
                                                utsname.machine,
                                                pae, hvm,
                                                guest_arches, i)) == NULL)
-        virReportOOMError(NULL);
+        virReportOOMError();
 
     return caps;
 }
@@ -2623,7 +2623,7 @@ xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn,
     return caps;
 
  no_memory:
-    virReportOOMError(NULL);
+    virReportOOMError();
     virCapabilitiesFree(caps);
     return NULL;
 }
@@ -2696,7 +2696,7 @@ xenHypervisorGetCapabilities (virConnectPtr conn)
     char *xml;
 
     if (!(xml = virCapabilitiesFormatXML(priv->caps))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -2729,7 +2729,7 @@ xenHypervisorNumOfDomains(virConnectPtr conn)
 
  retry:
     if (!(XEN_GETDOMAININFOLIST_ALLOC(dominfos, maxids))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return(-1);
     }
 
@@ -2790,7 +2790,7 @@ xenHypervisorListDomains(virConnectPtr conn, int *ids, int maxids)
         return(0);
 
     if (!(XEN_GETDOMAININFOLIST_ALLOC(dominfos, maxids))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return(-1);
     }
 
@@ -2862,7 +2862,7 @@ xenHypervisorDomainGetOSType (virDomainPtr dom)
         ostype = strdup("linux");
 
     if (ostype == NULL)
-        virReportOOMError(dom->conn);
+        virReportOOMError();
 
     return ostype;
 }
@@ -2940,7 +2940,7 @@ xenHypervisorLookupDomainByUUID(virConnectPtr conn,
 
  retry:
     if (!(XEN_GETDOMAININFOLIST_ALLOC(dominfos, maxids))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return(NULL);
     }
 
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
index d9dfbb7..2445b58 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -105,7 +105,7 @@ xenInotifyXenCacheLookup(virConnectPtr conn,
 
     if (!*name) {
         DEBUG0("Error getting dom from def");
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
     return 0;
@@ -144,7 +144,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
             if (!memcmp(rawuuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN)) {
                 *name = strdup(priv->configInfoList->doms[i]->name);
                 if (!*name) {
-                    virReportOOMError(conn);
+                    virReportOOMError();
                     return -1;
                 }
                 memcpy(uuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN);
@@ -158,7 +158,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
     }
 
     if (!(*name = strdup(dom->name))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
     memcpy(uuid, dom->uuid, VIR_UUID_BUFLEN);
@@ -397,7 +397,7 @@ xenInotifyOpen(virConnectPtr conn,
         priv->useXenConfigCache = 0;
 
         if (VIR_ALLOC(priv->configInfoList) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
 
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 9c5127f..402a209 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -527,7 +527,7 @@ xend_op_ext(virConnectPtr xend, const char *path, char *error,
 
     if (virBufferError(&buf)) {
         virBufferFreeAndReset(&buf);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -709,7 +709,7 @@ urlencode(const char *string)
     size_t i;
 
     if (VIR_ALLOC_N(buffer, len * 3 + 1) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return (NULL);
     }
     ptr = buffer;
@@ -1061,7 +1061,7 @@ xenDaemonDomainLookupByID(virConnectPtr xend,
     if (domname) {
       *domname = strdup(name);
       if (*domname == NULL) {
-          virReportOOMError(xend);
+          virReportOOMError();
           goto error;
       }
     }
@@ -1210,7 +1210,7 @@ xenDaemonParseSxprOS(virConnectPtr xend,
     return 0;
 
 no_memory:
-    virReportOOMError(xend);
+    virReportOOMError();
     return -1;
 }
 
@@ -1421,7 +1421,7 @@ xend_parse_sexp_desc_char(virConnectPtr conn,
 
     if (ret == -1) {
 no_memory:
-        virReportOOMError(conn);
+        virReportOOMError();
     }
 
 error:
@@ -1445,7 +1445,7 @@ xenDaemonParseSxprChar(virConnectPtr conn,
     virDomainChrDefPtr def;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1573,7 +1573,7 @@ xenDaemonParseSxprChar(virConnectPtr conn,
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainChrDefFree(def);
     return NULL;
@@ -1752,7 +1752,7 @@ xenDaemonParseSxprDisks(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 
 error:
     virDomainDiskDefFree(disk);
@@ -1861,7 +1861,7 @@ xenDaemonParseSxprNets(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 cleanup:
     virDomainNetDefFree(net);
     return -1;
@@ -1941,15 +1941,14 @@ xenDaemonParseSxprSound(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     return -1;
 }
 
 
 static int
-xenDaemonParseSxprUSB(virConnectPtr conn,
-                      virDomainDefPtr def,
+xenDaemonParseSxprUSB(virDomainDefPtr def,
                       const struct sexpr *root)
 {
     struct sexpr *cur, *node;
@@ -1985,7 +1984,7 @@ xenDaemonParseSxprUSB(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     return -1;
 }
 
@@ -2076,7 +2075,7 @@ xenDaemonParseSxprGraphicsOld(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     virDomainGraphicsDefFree(graphics);
     return -1;
 }
@@ -2179,7 +2178,7 @@ xenDaemonParseSxprGraphicsNew(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     virDomainGraphicsDefFree(graphics);
     return -1;
@@ -2303,7 +2302,7 @@ xenDaemonParseSxprPCI(virConnectPtr conn,
     return 0;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 
 error:
     virDomainHostdevDefFree(dev);
@@ -2407,7 +2406,7 @@ xenDaemonParseSxpr(virConnectPtr conn,
     if (cpus != NULL) {
         def->cpumasklen = VIR_DOMAIN_CPUMASK_LEN;
         if (VIR_ALLOC_N(def->cpumask, def->cpumasklen) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -2567,7 +2566,7 @@ xenDaemonParseSxpr(virConnectPtr conn,
 
     /* in case of HVM we have USB device emulation */
     if (hvm &&
-        xenDaemonParseSxprUSB(conn, def, root) < 0)
+        xenDaemonParseSxprUSB(def, root) < 0)
         goto error;
 
     /* Character device config */
@@ -2620,7 +2619,7 @@ xenDaemonParseSxpr(virConnectPtr conn,
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 error:
     VIR_FREE(tty);
     virDomainDefFree(def);
@@ -2841,7 +2840,7 @@ sexpr_to_xend_topology(virConnectPtr conn,
   memory_error:
     VIR_FREE(cpuNums);
     VIR_FREE(cpuset);
-    virReportOOMError(conn);
+    virReportOOMError();
     return (-1);
 }
 
@@ -2962,7 +2961,7 @@ xenDaemonOpen(virConnectPtr conn,
     } else if (STRCASEEQ (conn->uri->scheme, "http")) {
         if (conn->uri->port &&
             virAsprintf(&port, "%d", conn->uri->port) == -1) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto failed;
         }
 
@@ -3182,7 +3181,7 @@ xenDaemonDomainGetOSType(virDomainPtr domain)
     }
 
     if (type == NULL)
-        virReportOOMError(domain->conn);
+        virReportOOMError();
 
     sexpr_free(root);
 
@@ -3984,7 +3983,7 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
                     name = strdup(*tmp);
 
                     if (name == NULL)
-                        virReportOOMError(conn);
+                        virReportOOMError();
 
                     break;
                 }
@@ -4011,7 +4010,7 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
             name = strdup(domname);
 
             if (name == NULL)
-                virReportOOMError(conn);
+                virReportOOMError();
         }
 
         sexpr_free(root);
@@ -4364,7 +4363,7 @@ xenDaemonDomainSetAutostart(virDomainPtr domain,
         autonode->u.s.car->u.value = (autostart ? strdup("start")
                                                 : strdup("ignore"));
         if (!(autonode->u.s.car->u.value)) {
-            virReportOOMError(domain->conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -4516,7 +4515,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
         }
         hostname = strdup (uriptr->server);
         if (!hostname) {
-            virReportOOMError (conn);
+            virReportOOMError();
             xmlFreeURI (uriptr);
             return -1;
         }
@@ -4538,7 +4537,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
         n = p - uri; /* n = Length of hostname in bytes. */
         hostname = strdup (uri);
         if (!hostname) {
-            virReportOOMError (conn);
+            virReportOOMError();
             return -1;
         }
         hostname[n] = '\0';
@@ -4546,7 +4545,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
     else {                      /* "hostname" (or IP address) */
         hostname = strdup (uri);
         if (!hostname) {
-            virReportOOMError (conn);
+            virReportOOMError();
             return -1;
         }
     }
@@ -4740,7 +4739,7 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames
             continue;
 
         if ((names[ret++] = strdup(node->u.value)) == NULL) {
-            virReportOOMError(conn);
+            virReportOOMError();
             goto error;
         }
 
@@ -4808,14 +4807,14 @@ xenDaemonGetSchedulerType(virDomainPtr domain, int *nparams)
     if (STREQ (ret, "credit")) {
         schedulertype = strdup("credit");
         if (schedulertype == NULL){
-            virReportOOMError(domain->conn);
+            virReportOOMError();
             goto error;
         }
         *nparams = XEN_SCHED_CRED_NPARAM;
     } else if (STREQ (ret, "sedf")) {
         schedulertype = strdup("sedf");
         if (schedulertype == NULL){
-            virReportOOMError(domain->conn);
+            virReportOOMError();
             goto error;
         }
         *nparams = XEN_SCHED_SEDF_NPARAM;
@@ -5337,7 +5336,7 @@ xenDaemonFormatSxprChr(virConnectPtr conn,
     }
 
     if (virBufferError(buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -5684,7 +5683,7 @@ xenDaemonFormatSxprSound(virConnectPtr conn,
     }
 
     if (virBufferError(buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -5960,7 +5959,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
     virBufferAddLit(&buf, ")"); /* closes (vm */
 
     if (virBufferError(&buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -6050,7 +6049,7 @@ virDomainXMLDevID(virDomainPtr domain,
                         def->source.subsys.u.pci.bus,
                         def->source.subsys.u.pci.slot,
                         def->source.subsys.u.pci.function) < 0) {
-            virReportOOMError(NULL);
+            virReportOOMError();
             return -1;
         }
 
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 944d5d5..23e11d7 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -251,7 +251,7 @@ static int xenXMConfigCopyStringInternal(virConnectPtr conn,
     }
 
     if (!(*value = strdup(val->str))) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -432,7 +432,7 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
     } else { /* Completely new entry */
         newborn = 1;
         if (VIR_ALLOC(entry) < 0) {
-            virReportOOMError(conn);
+            virReportOOMError();
             return -1;
         }
         memcpy(entry->filename, filename, PATH_MAX);
@@ -683,7 +683,7 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
     const char *defaultArch, *defaultMachine;
 
     if (VIR_ALLOC(def) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return NULL;
     }
 
@@ -1464,7 +1464,7 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
     return def;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
     /* fallthrough */
 cleanup:
     virDomainGraphicsDefFree(graphics);
@@ -1745,7 +1745,7 @@ int xenXMDomainPinVcpu(virDomainPtr domain,
 
     if (virBufferError(&mapbuf)) {
         virBufferFreeAndReset(&mapbuf);
-        virReportOOMError(domain->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -1753,7 +1753,7 @@ int xenXMDomainPinVcpu(virDomainPtr domain,
     mapsave = mapstr;
 
     if (VIR_ALLOC_N(cpuset, maxcpu) < 0) {
-        virReportOOMError(domain->conn);
+        virReportOOMError();
         goto cleanup;
     }
     if (virDomainCpuSetParse(domain->conn,
@@ -1934,7 +1934,7 @@ int xenXMConfigSetInt(virConfPtr conf, const char *setting, long l) {
     virConfValuePtr value = NULL;
 
     if (VIR_ALLOC(value) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1951,7 +1951,7 @@ int xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str)
     virConfValuePtr value = NULL;
 
     if (VIR_ALLOC(value) < 0) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -1959,7 +1959,7 @@ int xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str)
     value->next = NULL;
     if (!(value->str = strdup(str))) {
         VIR_FREE(value);
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
 
@@ -2014,12 +2014,12 @@ static int xenXMDomainConfigFormatDisk(virConnectPtr conn,
         virBufferAddLit(&buf, ",w");
 
     if (virBufferError(&buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_ALLOC(val) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2124,12 +2124,12 @@ static int xenXMDomainConfigFormatNet(virConnectPtr conn,
                           net->ifname);
 
     if (virBufferError(&buf)) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
     if (VIR_ALLOC(val) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2153,8 +2153,7 @@ cleanup:
 
 
 static int
-xenXMDomainConfigFormatPCI(virConnectPtr conn,
-                           virConfPtr conf,
+xenXMDomainConfigFormatPCI(virConfPtr conf,
                            virDomainDefPtr def)
 {
 
@@ -2171,7 +2170,7 @@ xenXMDomainConfigFormatPCI(virConnectPtr conn,
         return 0;
 
     if (VIR_ALLOC(pciVal) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -2189,13 +2188,13 @@ xenXMDomainConfigFormatPCI(virConnectPtr conn,
                             def->hostdevs[i]->source.subsys.u.pci.bus,
                             def->hostdevs[i]->source.subsys.u.pci.slot,
                             def->hostdevs[i]->source.subsys.u.pci.function) < 0) {
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto error;
             }
 
             if (VIR_ALLOC(val) < 0) {
                 VIR_FREE(buf);
-                virReportOOMError(conn);
+                virReportOOMError();
                 goto error;
             }
             val->type = VIR_CONF_STRING;
@@ -2550,7 +2549,7 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
     }
     VIR_FREE(netVal);
 
-    if (xenXMDomainConfigFormatPCI(conn, conf, def) < 0)
+    if (xenXMDomainConfigFormatPCI(conf, def) < 0)
         goto cleanup;
 
     if (hvm) {
@@ -2608,7 +2607,7 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
     return conf;
 
 no_memory:
-    virReportOOMError(conn);
+    virReportOOMError();
 
 cleanup:
     virConfFreeValue(diskVal);
@@ -2726,7 +2725,7 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
         goto error;
 
     if (VIR_ALLOC(entry) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         goto error;
     }
 
@@ -2875,7 +2874,7 @@ int xenXMListDefinedDomains(virConnectPtr conn, char **const names, int maxnames
         for (i = 0; i < ctx.count; i++)
             VIR_FREE(ctx.names[i]);
 
-        virReportOOMError(conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -2962,7 +2961,7 @@ xenXMDomainAttachDevice(virDomainPtr domain, const char *xml) {
     case VIR_DOMAIN_DEVICE_DISK:
     {
         if (virDomainDiskInsert(def, dev->data.disk) < 0) {
-            virReportOOMError(domain->conn);
+            virReportOOMError();
             goto cleanup;
         }
         dev->data.disk = NULL;
@@ -2972,7 +2971,7 @@ xenXMDomainAttachDevice(virDomainPtr domain, const char *xml) {
     case VIR_DOMAIN_DEVICE_NET:
     {
         if (VIR_REALLOC_N(def->nets, def->nnets+1) < 0) {
-            virReportOOMError(domain->conn);
+            virReportOOMError();
             goto cleanup;
         }
         def->nets[def->nnets++] = dev->data.net;
@@ -3138,7 +3137,7 @@ int xenXMDomainGetAutostart(virDomainPtr dom, int *autostart)
     int ret = -1;
 
     if (!linkname || !config) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
@@ -3166,7 +3165,7 @@ int xenXMDomainSetAutostart(virDomainPtr dom, int autostart)
     int ret = -1;
 
     if (!linkname || !config) {
-        virReportOOMError(dom->conn);
+        virReportOOMError();
         goto cleanup;
     }
 
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index 620c482..4294dad 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -305,7 +305,7 @@ xenStoreOpen(virConnectPtr conn,
 #ifndef PROXY
     /* Init activeDomainList */
     if (VIR_ALLOC(priv->activeDomainList) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -313,7 +313,7 @@ xenStoreOpen(virConnectPtr conn,
        so we can know if it is the first time through
        when the callback fires */
     if (VIR_ALLOC(priv->xsWatchList) < 0) {
-        virReportOOMError(conn);
+        virReportOOMError();
         return -1;
     }
 
@@ -908,7 +908,7 @@ xenStoreDomainGetOSTypeID(virConnectPtr conn, int id) {
     if (str == NULL)
         str = strdup("linux");
     if (str == NULL)
-        virReportOOMError(conn);
+        virReportOOMError();
 
     return (str);
 }
@@ -962,7 +962,7 @@ xenStoreDomainGetNetworkID(virConnectPtr conn, int id, const char *mac) {
             ret = strdup(list[i]);
 
             if (ret == NULL)
-                virReportOOMError(conn);
+                virReportOOMError();
 
             break;
         }
@@ -1020,7 +1020,7 @@ xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) {
                 ret = strdup(list[i]);
 
                 if (ret == NULL)
-                    virReportOOMError(conn);
+                    virReportOOMError();
 
                 VIR_FREE (val);
                 VIR_FREE (list);
@@ -1043,7 +1043,7 @@ xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) {
                 ret = strdup(list[i]);
 
                 if (ret == NULL)
-                    virReportOOMError(conn);
+                    virReportOOMError();
 
                 VIR_FREE (val);
                 VIR_FREE (list);
@@ -1235,7 +1235,7 @@ int xenStoreAddWatch(virConnectPtr conn,
         VIR_FREE(watch);
     }
 
-    virReportOOMError(conn);
+    virReportOOMError();
 
     return -1;
 }
@@ -1371,7 +1371,7 @@ retry:
         return -1;
 
     if( VIR_ALLOC_N(new_domids,new_domain_cnt) < 0 ) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
@@ -1454,7 +1454,7 @@ retry:
         return -1;
 
     if( VIR_ALLOC_N(new_domids,new_domain_cnt) < 0 ) {
-        virReportOOMError(NULL);
+        virReportOOMError();
         return -1;
     }
     nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
-- 
1.6.3.3


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