]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: remove duplicate macros
authorJán Tomko <jtomko@redhat.com>
Mon, 20 Jun 2016 14:55:59 +0000 (16:55 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 21 Jun 2016 16:07:25 +0000 (18:07 +0200)
There is a definiton of VIR_FROM_THIS just two lines above.

The rest is defined in vbox_common.h.

src/vbox/vbox_driver.c
src/vbox/vbox_network.c

index a5f3721682cb2d3ee2c30f51e7cb545b05d9bcd7..b3b4ee6e1b1d232c3c4bb8d593d4e9eba653ed85 100644 (file)
@@ -48,8 +48,6 @@
 
 VIR_LOG_INIT("vbox.vbox_driver");
 
-#define VIR_FROM_THIS VIR_FROM_VBOX
-
 #if !defined(WITH_DRIVER_MODULES) || defined(VBOX_DRIVER)
 static virDrvOpenStatus dummyConnectOpen(virConnectPtr conn,
                                          virConnectAuthPtr auth ATTRIBUTE_UNUSED,
index ee409e3e53bb0ee225c099eeca654f7e465baff0..4cfc3658f6daee61c5ba685e01ee566a3cf4cc3c 100644 (file)
 
 VIR_LOG_INIT("vbox.vbox_network");
 
-#define RC_SUCCEEDED(rc) NS_SUCCEEDED(rc.resultCode)
-#define RC_FAILED(rc) NS_FAILED(rc.resultCode)
-
-#define VBOX_UTF16_FREE(arg)                                            \
-    do {                                                                \
-        if (arg) {                                                      \
-            gVBoxAPI.UPFN.Utf16Free(data->pFuncs, arg);                 \
-            (arg) = NULL;                                               \
-        }                                                               \
-    } while (0)
-
-#define VBOX_UTF8_FREE(arg)                                             \
-    do {                                                                \
-        if (arg) {                                                      \
-            gVBoxAPI.UPFN.Utf8Free(data->pFuncs, arg);                  \
-            (arg) = NULL;                                               \
-        }                                                               \
-    } while (0)
-
-#define VBOX_UTF16_TO_UTF8(arg1, arg2)  gVBoxAPI.UPFN.Utf16ToUtf8(data->pFuncs, arg1, arg2)
-#define VBOX_UTF8_TO_UTF16(arg1, arg2)  gVBoxAPI.UPFN.Utf8ToUtf16(data->pFuncs, arg1, arg2)
-
-#define VBOX_RELEASE(arg)                                                     \
-    do {                                                                      \
-        if (arg) {                                                            \
-            gVBoxAPI.nsUISupports.Release((void *)arg);                       \
-            (arg) = NULL;                                                     \
-        }                                                                     \
-    } while (0)
-
-#define vboxIIDUnalloc(iid)                     gVBoxAPI.UIID.vboxIIDUnalloc(data, iid)
-#define vboxIIDToUUID(iid, uuid)                gVBoxAPI.UIID.vboxIIDToUUID(data, iid, uuid)
-#define vboxIIDFromUUID(iid, uuid)              gVBoxAPI.UIID.vboxIIDFromUUID(data, iid, uuid)
-#define vboxIIDIsEqual(iid1, iid2)              gVBoxAPI.UIID.vboxIIDIsEqual(data, iid1, iid2)
-#define DEBUGIID(msg, iid)                      gVBoxAPI.UIID.DEBUGIID(msg, iid)
-#define vboxIIDFromArrayItem(iid, array, idx) \
-    gVBoxAPI.UIID.vboxIIDFromArrayItem(data, iid, array, idx)
-
-#define VBOX_IID_INITIALIZE(iid)                gVBoxAPI.UIID.vboxIIDInitialize(iid)
-
-#define ARRAY_GET_MACHINES \
-    (gVBoxAPI.UArray.handleGetMachines(data->vboxObj))
-
 static vboxUniformedAPI gVBoxAPI;
 
 /**