[PATCH v1 05/37] Adapt to VIR_ALLOC and virAsprintf in src/access/*

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

 



---
 src/access/viraccessdriverpolkit.c | 4 +---
 src/access/viraccessdriverstack.c  | 4 +---
 src/access/viraccessmanager.c      | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c
index 6e503ba..4c76e64 100644
--- a/src/access/viraccessdriverpolkit.c
+++ b/src/access/viraccessdriverpolkit.c
@@ -57,10 +57,8 @@ virAccessDriverPolkitFormatAction(const char *typename,
 
     if (virAsprintf(&actionid, "%s.%s.%s",
                     VIR_ACCESS_DRIVER_POLKIT_ACTION_PREFIX,
-                    typename, permname) < 0) {
-        virReportOOMError();
+                    typename, permname) < 0)
         return NULL;
-    }
 
     for (i = 0; actionid[i]; i++)
         if (actionid[i] == '_')
diff --git a/src/access/viraccessdriverstack.c b/src/access/viraccessdriverstack.c
index ea20db8..11ed4f6 100644
--- a/src/access/viraccessdriverstack.c
+++ b/src/access/viraccessdriverstack.c
@@ -40,10 +40,8 @@ int virAccessDriverStackAppend(virAccessManagerPtr manager,
 {
     virAccessDriverStackPrivatePtr priv = virAccessManagerGetPrivateData(manager);
 
-    if (VIR_EXPAND_N(priv->managers, priv->managersLen, 1) < 0) {
-        virReportOOMError();
+    if (VIR_EXPAND_N(priv->managers, priv->managersLen, 1) < 0)
         return -1;
-    }
 
     priv->managers[priv->managersLen-1] = child;
 
diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c
index 559a844..16e3853 100644
--- a/src/access/viraccessmanager.c
+++ b/src/access/viraccessmanager.c
@@ -85,10 +85,8 @@ static virAccessManagerPtr virAccessManagerNewDriver(virAccessDriverPtr drv)
     if (virAccessManagerInitialize() < 0)
         return NULL;
 
-    if (VIR_ALLOC_N(privateData, drv->privateDataLen) < 0) {
-        virReportOOMError();
+    if (VIR_ALLOC_N(privateData, drv->privateDataLen) < 0)
         return NULL;
-    }
 
     if (!(mgr = virObjectLockableNew(virAccessManagerClass))) {
         VIR_FREE(privateData);
-- 
1.8.1.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]