[libvirt] [PATCH 12/30] xen: Remove virConnectPtr from virXenInotifyError

Matthias Bolte matthias.bolte at googlemail.com
Sun Apr 4 17:36:35 UTC 2010


---
 src/xen/xen_inotify.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
index 8ff3256..d24b20f 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -44,7 +44,7 @@
 
 #define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY
 
-#define virXenInotifyError(conn, code, ...)                                   \
+#define virXenInotifyError(code, ...)                                   \
         virReportErrorHelper(NULL, VIR_FROM_XEN_INOTIFY, code, __FILE__,      \
                              __FUNCTION__, __LINE__, __VA_ARGS__)
 
@@ -129,7 +129,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
     uuid_str = filename + strlen(XEND_DOMAINS_DIR) + 1;
 
     if (virUUIDParse(uuid_str, rawuuid) < 0) {
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                            _("parsing uuid %s"), uuid_str);
         return -1;
     }
@@ -154,7 +154,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
                 return 0;
             }
         }
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                            "%s", _("finding dom on config list"));
         return -1;
     }
@@ -205,7 +205,7 @@ xenInotifyXendDomainsDirRemoveEntry(virConnectPtr conn,
     int i;
 
     if (virUUIDParse(uuidstr, uuid) < 0) {
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                            _("parsing uuid %s"), uuidstr);
         return -1;
     }
@@ -241,14 +241,14 @@ xenInotifyXendDomainsDirAddEntry(virConnectPtr conn,
     xenUnifiedPrivatePtr priv = conn->privateData;
 
     if (xenInotifyDomainLookup(conn, fname, &name, uuid) < 0) {
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                            "%s", _("Error looking up domain"));
         return -1;
     }
 
     if (xenUnifiedAddDomainInfo(priv->configInfoList,
                                 -1, name, uuid) < 0) {
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                         "%s", _("Error adding file to config cache"));
         VIR_FREE(name);
         return -1;
@@ -294,7 +294,7 @@ xenInotifyEvent(int watch ATTRIBUTE_UNUSED,
     if( conn && conn->privateData ) {
         priv = conn->privateData;
     } else {
-        virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+        virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                            "%s", _("conn, or private data is NULL"));
         return;
     }
@@ -337,18 +337,18 @@ reread:
             if (event)
                 xenUnifiedDomainEventDispatch(conn->privateData, event);
             else
-                virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+                virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                                    "%s", _("looking up dom"));
 
             if (xenInotifyRemoveDomainConfigInfo(conn, fname) < 0 ) {
-                virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+                virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                                    "%s", _("Error adding file to config cache"));
                 goto cleanup;
             }
         } else if (e->mask & ( IN_CREATE | IN_CLOSE_WRITE | IN_MOVED_TO) ) {
             virDomainEventPtr event;
             if (xenInotifyAddDomainConfigInfo(conn, fname) < 0 ) {
-                virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+                virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                                    "%s", _("Error adding file to config cache"));
                 goto cleanup;
             }
@@ -360,7 +360,7 @@ reread:
             if (event)
                 xenUnifiedDomainEventDispatch(conn->privateData, event);
             else
-                virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+                virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                                    "%s", _("looking up dom"));
 
         }
@@ -423,7 +423,7 @@ xenInotifyOpen(virConnectPtr conn,
             strcat(path, ent->d_name);
 
             if (xenInotifyAddDomainConfigInfo(conn, path) < 0 ) {
-                virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
+                virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
                                    "%s", _("Error adding file to config list"));
                 closedir(dh);
                 return -1;
-- 
1.6.3.3




More information about the libvir-list mailing list