A large number of return values used 'return (0)' instead of simply 'return 0'. Remove all these redundant brackets so the style is consistent throughout the file * src/libvirt.c: Remove redundant brackets --- src/libvirt.c | 472 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 236 insertions(+), 236 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index f09e229..a79e1a0 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -344,7 +344,7 @@ int virInitialize(void) { if (initialized) - return(0); + return 0; initialized = 1; @@ -365,7 +365,7 @@ virInitialize(void) #endif if (!bindtextdomain(PACKAGE, LOCALEDIR)) - return (-1); + return -1; /* * Note that the order is important: the first ones have a higher @@ -431,7 +431,7 @@ virInitialize(void) # endif #endif - return(0); + return 0; } #ifdef WIN32 @@ -519,14 +519,14 @@ virRegisterNetworkDriver(virNetworkDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virNetworkDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } DEBUG ("registering %s as network driver %d", @@ -552,14 +552,14 @@ virRegisterInterfaceDriver(virInterfaceDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virInterfaceDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } DEBUG ("registering %s as interface driver %d", @@ -585,14 +585,14 @@ virRegisterStorageDriver(virStorageDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virStorageDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } DEBUG ("registering %s as storage driver %d", @@ -618,14 +618,14 @@ virRegisterDeviceMonitor(virDeviceMonitorPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virDeviceMonitorTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } DEBUG ("registering %s as device driver %d", @@ -651,14 +651,14 @@ virRegisterSecretDriver(virSecretDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virSecretDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } DEBUG ("registering %s as secret driver %d", @@ -720,14 +720,14 @@ virRegisterDriver(virDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } if (driver->no < 0) { @@ -760,14 +760,14 @@ virRegisterStateDriver(virStateDriverPtr driver) if (driver == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); - return(-1); + return -1; } if (virStateDriverTabCount >= MAX_DRIVERS) { virLibConnError(VIR_ERR_INTERNAL_ERROR, _("Too many drivers, cannot register %s"), driver->name); - return(-1); + return -1; } virStateDriverTab[virStateDriverTabCount] = driver; @@ -954,7 +954,7 @@ virGetVersion(unsigned long *libVer, const char *type, } #endif /* WITH_DRIVER_MODULES */ } - return (0); + return 0; error: virDispatchError(NULL); @@ -1351,7 +1351,7 @@ virConnectRef(virConnectPtr conn) if ((!VIR_IS_CONNECT(conn))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&conn->lock); DEBUG("conn=%p refs=%d", conn, conn->refs); @@ -1375,7 +1375,7 @@ virDrvSupportsFeature (virConnectPtr conn, int feature) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (!conn->driver->supports_feature) @@ -1411,7 +1411,7 @@ virConnectGetType(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (conn->driver->type) { @@ -1759,7 +1759,7 @@ virDomainCreateXML(virConnectPtr conn, const char *xmlDesc, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (xmlDesc == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -1800,7 +1800,7 @@ virDomainPtr virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc, unsigned int flags) { - return(virDomainCreateXML(conn, xmlDesc, flags)); + return virDomainCreateXML(conn, xmlDesc, flags); } /** @@ -1825,7 +1825,7 @@ virDomainLookupByID(virConnectPtr conn, int id) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (id < 0) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -1870,7 +1870,7 @@ virDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuid == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -1913,7 +1913,7 @@ virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuidstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -1952,7 +1952,7 @@ virDomainLookupByName(virConnectPtr conn, const char *name) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -1997,7 +1997,7 @@ virDomainDestroy(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; @@ -2040,13 +2040,13 @@ virDomainFree(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefDomain(domain) < 0) { virDispatchError(NULL); return -1; } - return(0); + return 0; } /** @@ -2072,7 +2072,7 @@ virDomainRef(virDomainPtr domain) if ((!VIR_IS_CONNECTED_DOMAIN(domain))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&domain->conn->lock); VIR_DOMAIN_DEBUG(domain, "refs=%d", domain->refs); @@ -2106,7 +2106,7 @@ virDomainSuspend(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2152,7 +2152,7 @@ virDomainResume(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2201,7 +2201,7 @@ virDomainSave(virDomainPtr domain, const char *to) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2222,11 +2222,11 @@ virDomainSave(virDomainPtr domain, const char *to) t = strlen(to); if (getcwd(filepath, sizeof(filepath) - (t + 3)) == NULL) - return (-1); + return -1; len = strlen(filepath); /* that should be covered by getcwd() semantic, but be 100% sure */ if (len > sizeof(filepath) - (t + 3)) - return (-1); + return -1; filepath[len] = '/'; strcpy(&filepath[len + 1], to); to = &filepath[0]; @@ -2268,7 +2268,7 @@ virDomainRestore(virConnectPtr conn, const char *from) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->flags & VIR_CONNECT_RO) { virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2344,7 +2344,7 @@ virDomainCoreDump(virDomainPtr domain, const char *to, int flags) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2422,7 +2422,7 @@ virDomainShutdown(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2469,7 +2469,7 @@ virDomainReboot(virDomainPtr domain, unsigned int flags) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2512,9 +2512,9 @@ virDomainGetName(virDomainPtr domain) if (!VIR_IS_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (domain->name); + return domain->name; } /** @@ -2536,17 +2536,17 @@ virDomainGetUUID(virDomainPtr domain, unsigned char *uuid) if (!VIR_IS_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (uuid == NULL) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(domain->conn); - return (-1); + return -1; } memcpy(uuid, &domain->uuid[0], VIR_UUID_BUFLEN); - return (0); + return 0; } /** @@ -2571,7 +2571,7 @@ virDomainGetUUIDString(virDomainPtr domain, char *buf) if (!VIR_IS_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (buf == NULL) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -2582,7 +2582,7 @@ virDomainGetUUIDString(virDomainPtr domain, char *buf) goto error; virUUIDFormat(uuid, buf); - return (0); + return 0; error: virDispatchError(domain->conn); @@ -2607,9 +2607,9 @@ virDomainGetID(virDomainPtr domain) if (!VIR_IS_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return ((unsigned int) -1); + return (unsigned int)-1; } - return (domain->id); + return domain->id; } /** @@ -2633,7 +2633,7 @@ virDomainGetOSType(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = domain->conn; @@ -2675,7 +2675,7 @@ virDomainGetMaxMemory(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (0); + return 0; } conn = domain->conn; @@ -2722,7 +2722,7 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2776,7 +2776,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -2953,7 +2953,7 @@ virDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -3002,7 +3002,7 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = domain->conn; @@ -3056,7 +3056,7 @@ char *virConnectDomainXMLFromNative(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (nativeFormat == NULL || nativeConfig == NULL) { @@ -3108,7 +3108,7 @@ char *virConnectDomainXMLToNative(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (nativeFormat == NULL || domainXml == NULL) { @@ -3976,7 +3976,7 @@ virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -4637,7 +4637,7 @@ virDomainGetBlockInfo(virDomainPtr domain, const char *path, virDomainBlockInfoP if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -4691,7 +4691,7 @@ virDomainDefineXML(virConnectPtr conn, const char *xml) { if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (conn->flags & VIR_CONNECT_RO) { virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -4736,7 +4736,7 @@ virDomainUndefine(virDomainPtr domain) { if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -4777,7 +4777,7 @@ virConnectNumOfDefinedDomains(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->driver->numOfDefinedDomains) { @@ -4816,7 +4816,7 @@ virConnectListDefinedDomains(virConnectPtr conn, char **const names, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -4859,7 +4859,7 @@ virDomainCreate(virDomainPtr domain) { if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -4903,7 +4903,7 @@ virDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) { if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -4950,7 +4950,7 @@ virDomainGetAutostart(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (!autostart) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -4997,7 +4997,7 @@ virDomainSetAutostart(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; @@ -5052,7 +5052,7 @@ virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5119,7 +5119,7 @@ virDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5183,7 +5183,7 @@ virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } /* Exactly one of these two flags should be set. */ @@ -5243,7 +5243,7 @@ virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5308,7 +5308,7 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((info == NULL) || (maxinfo < 1)) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -5365,7 +5365,7 @@ virDomainGetMaxVcpus(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; @@ -5499,7 +5499,7 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5558,7 +5558,7 @@ virDomainAttachDeviceFlags(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5603,7 +5603,7 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5658,7 +5658,7 @@ virDomainDetachDeviceFlags(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5717,7 +5717,7 @@ virDomainUpdateDeviceFlags(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); - return (-1); + return -1; } if (domain->conn->flags & VIR_CONNECT_RO) { virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -5770,7 +5770,7 @@ virNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *freeMems, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((freeMems == NULL) || (maxCells <= 0) || (startCell < 0)) { @@ -5840,7 +5840,7 @@ virConnectNumOfNetworks(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->networkDriver && conn->networkDriver->numOfNetworks) { @@ -5878,7 +5878,7 @@ virConnectListNetworks(virConnectPtr conn, char **const names, int maxnames) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -5919,7 +5919,7 @@ virConnectNumOfDefinedNetworks(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->networkDriver && conn->networkDriver->numOfDefinedNetworks) { @@ -5958,7 +5958,7 @@ virConnectListDefinedNetworks(virConnectPtr conn, char **const names, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -6002,7 +6002,7 @@ virNetworkLookupByName(virConnectPtr conn, const char *name) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6047,7 +6047,7 @@ virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuid == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6090,7 +6090,7 @@ virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuidstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6129,7 +6129,7 @@ virNetworkCreateXML(virConnectPtr conn, const char *xmlDesc) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (xmlDesc == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6174,7 +6174,7 @@ virNetworkDefineXML(virConnectPtr conn, const char *xml) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (conn->flags & VIR_CONNECT_RO) { virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -6218,7 +6218,7 @@ virNetworkUndefine(virNetworkPtr network) { if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = network->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -6261,7 +6261,7 @@ virNetworkCreate(virNetworkPtr network) if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = network->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -6306,7 +6306,7 @@ virNetworkDestroy(virNetworkPtr network) if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = network->conn; @@ -6349,13 +6349,13 @@ virNetworkFree(virNetworkPtr network) if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefNetwork(network) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return(0); + return 0; } /** @@ -6381,7 +6381,7 @@ virNetworkRef(virNetworkPtr network) if ((!VIR_IS_CONNECTED_NETWORK(network))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&network->conn->lock); DEBUG("network=%p refs=%d", network, network->refs); @@ -6409,9 +6409,9 @@ virNetworkGetName(virNetworkPtr network) if (!VIR_IS_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (network->name); + return network->name; } /** @@ -6433,7 +6433,7 @@ virNetworkGetUUID(virNetworkPtr network, unsigned char *uuid) if (!VIR_IS_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (uuid == NULL) { virLibNetworkError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6442,7 +6442,7 @@ virNetworkGetUUID(virNetworkPtr network, unsigned char *uuid) memcpy(uuid, &network->uuid[0], VIR_UUID_BUFLEN); - return (0); + return 0; error: virDispatchError(network->conn); @@ -6470,7 +6470,7 @@ virNetworkGetUUIDString(virNetworkPtr network, char *buf) if (!VIR_IS_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (buf == NULL) { virLibNetworkError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6481,7 +6481,7 @@ virNetworkGetUUIDString(virNetworkPtr network, char *buf) goto error; virUUIDFormat(uuid, buf); - return (0); + return 0; error: virDispatchError(network->conn); @@ -6510,7 +6510,7 @@ virNetworkGetXMLDesc(virNetworkPtr network, int flags) if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (flags != 0) { virLibNetworkError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6555,7 +6555,7 @@ virNetworkGetBridgeName(virNetworkPtr network) if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = network->conn; @@ -6598,7 +6598,7 @@ virNetworkGetAutostart(virNetworkPtr network, if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (!autostart) { virLibNetworkError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6644,7 +6644,7 @@ virNetworkSetAutostart(virNetworkPtr network, if (!VIR_IS_CONNECTED_NETWORK(network)) { virLibNetworkError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (network->conn->flags & VIR_CONNECT_RO) { @@ -6716,7 +6716,7 @@ virConnectNumOfInterfaces(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->interfaceDriver && conn->interfaceDriver->numOfInterfaces) { @@ -6755,7 +6755,7 @@ virConnectListInterfaces(virConnectPtr conn, char **const names, int maxnames) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -6796,7 +6796,7 @@ virConnectNumOfDefinedInterfaces(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->interfaceDriver && conn->interfaceDriver->numOfDefinedInterfaces) { @@ -6837,7 +6837,7 @@ virConnectListDefinedInterfaces(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -6880,7 +6880,7 @@ virInterfaceLookupByName(virConnectPtr conn, const char *name) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6922,7 +6922,7 @@ virInterfaceLookupByMACString(virConnectPtr conn, const char *macstr) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (macstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -6963,9 +6963,9 @@ virInterfaceGetName(virInterfacePtr iface) if (!VIR_IS_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (iface->name); + return iface->name; } /** @@ -6989,9 +6989,9 @@ virInterfaceGetMACString(virInterfacePtr iface) if (!VIR_IS_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (iface->mac); + return iface->mac; } /** @@ -7023,7 +7023,7 @@ virInterfaceGetXMLDesc(virInterfacePtr iface, unsigned int flags) if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if ((flags & ~VIR_INTERFACE_XML_INACTIVE) != 0) { virLibInterfaceError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -7067,7 +7067,7 @@ virInterfaceDefineXML(virConnectPtr conn, const char *xml, unsigned int flags) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (conn->flags & VIR_CONNECT_RO) { virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -7112,7 +7112,7 @@ virInterfaceUndefine(virInterfacePtr iface) { if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = iface->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -7155,7 +7155,7 @@ virInterfaceCreate(virInterfacePtr iface, unsigned int flags) if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = iface->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -7200,7 +7200,7 @@ virInterfaceDestroy(virInterfacePtr iface, unsigned int flags) if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = iface->conn; @@ -7247,7 +7247,7 @@ virInterfaceRef(virInterfacePtr iface) if ((!VIR_IS_CONNECTED_INTERFACE(iface))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&iface->conn->lock); DEBUG("iface=%p refs=%d", iface, iface->refs); @@ -7275,13 +7275,13 @@ virInterfaceFree(virInterfacePtr iface) if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibInterfaceError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefInterface(iface) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return(0); + return 0; } @@ -7332,7 +7332,7 @@ virConnectNumOfStoragePools (virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->storageDriver && conn->storageDriver->numOfPools) { @@ -7374,7 +7374,7 @@ virConnectListStoragePools (virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -7416,7 +7416,7 @@ virConnectNumOfDefinedStoragePools(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->storageDriver && conn->storageDriver->numOfDefinedPools) { @@ -7459,7 +7459,7 @@ virConnectListDefinedStoragePools(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -7565,7 +7565,7 @@ virStoragePoolLookupByName(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -7608,7 +7608,7 @@ virStoragePoolLookupByUUID(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuid == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -7652,7 +7652,7 @@ virStoragePoolLookupByUUIDString(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuidstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -7690,7 +7690,7 @@ virStoragePoolLookupByVolume(virStorageVolPtr vol) if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (vol->conn->storageDriver && vol->conn->storageDriver->poolLookupByVolume) { @@ -7732,7 +7732,7 @@ virStoragePoolCreateXML(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (xmlDesc == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -7781,7 +7781,7 @@ virStoragePoolDefineXML(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (conn->flags & VIR_CONNECT_RO) { virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); @@ -7828,7 +7828,7 @@ virStoragePoolBuild(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -7871,7 +7871,7 @@ virStoragePoolUndefine(virStoragePoolPtr pool) if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_NETWORK, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -7916,7 +7916,7 @@ virStoragePoolCreate(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; if (conn->flags & VIR_CONNECT_RO) { @@ -7963,7 +7963,7 @@ virStoragePoolDestroy(virStoragePoolPtr pool) if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; @@ -8010,7 +8010,7 @@ virStoragePoolDelete(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; @@ -8054,13 +8054,13 @@ virStoragePoolFree(virStoragePoolPtr pool) if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefStoragePool(pool) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return(0); + return 0; } @@ -8088,7 +8088,7 @@ virStoragePoolRef(virStoragePoolPtr pool) if ((!VIR_IS_CONNECTED_STORAGE_POOL(pool))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&pool->conn->lock); DEBUG("pool=%p refs=%d", pool, pool->refs); @@ -8120,7 +8120,7 @@ virStoragePoolRefresh(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = pool->conn; @@ -8163,9 +8163,9 @@ virStoragePoolGetName(virStoragePoolPtr pool) if (!VIR_IS_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (pool->name); + return pool->name; } @@ -8189,7 +8189,7 @@ virStoragePoolGetUUID(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (uuid == NULL) { virLibStoragePoolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8198,7 +8198,7 @@ virStoragePoolGetUUID(virStoragePoolPtr pool, memcpy(uuid, &pool->uuid[0], VIR_UUID_BUFLEN); - return (0); + return 0; error: virDispatchError(pool->conn); @@ -8226,7 +8226,7 @@ virStoragePoolGetUUIDString(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (buf == NULL) { virLibStoragePoolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8237,7 +8237,7 @@ virStoragePoolGetUUIDString(virStoragePoolPtr pool, goto error; virUUIDFormat(uuid, buf); - return (0); + return 0; error: virDispatchError(pool->conn); @@ -8267,7 +8267,7 @@ virStoragePoolGetInfo(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibStoragePoolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8317,7 +8317,7 @@ virStoragePoolGetXMLDesc(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (flags != 0) { virLibStoragePoolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8364,7 +8364,7 @@ virStoragePoolGetAutostart(virStoragePoolPtr pool, if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibStoragePoolError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (!autostart) { virLibStoragePoolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8454,7 +8454,7 @@ virStoragePoolNumOfVolumes(virStoragePoolPtr pool) if (!VIR_IS_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (pool->conn->storageDriver && pool->conn->storageDriver->poolNumOfVolumes) { @@ -8496,7 +8496,7 @@ virStoragePoolListVolumes(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((names == NULL) || (maxnames < 0)) { @@ -8571,7 +8571,7 @@ virStorageVolLookupByName(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8616,7 +8616,7 @@ virStorageVolLookupByKey(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (key == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8659,7 +8659,7 @@ virStorageVolLookupByPath(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (path == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -8701,9 +8701,9 @@ virStorageVolGetName(virStorageVolPtr vol) if (!VIR_IS_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (vol->name); + return vol->name; } @@ -8727,9 +8727,9 @@ virStorageVolGetKey(virStorageVolPtr vol) if (!VIR_IS_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (vol->key); + return vol->key; } @@ -8757,7 +8757,7 @@ virStorageVolCreateXML(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (pool->conn->flags & VIR_CONNECT_RO) { @@ -8808,7 +8808,7 @@ virStorageVolCreateXMLFrom(virStoragePoolPtr pool, if (!VIR_IS_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (!VIR_IS_STORAGE_VOL(clonevol)) { @@ -8861,7 +8861,7 @@ virStorageVolDelete(virStorageVolPtr vol, if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = vol->conn; @@ -8907,7 +8907,7 @@ virStorageVolWipe(virStorageVolPtr vol, if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = vol->conn; @@ -8952,13 +8952,13 @@ virStorageVolFree(virStorageVolPtr vol) if (!VIR_IS_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefStorageVol(vol) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return(0); + return 0; } @@ -8985,7 +8985,7 @@ virStorageVolRef(virStorageVolPtr vol) if ((!VIR_IS_CONNECTED_STORAGE_VOL(vol))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&vol->conn->lock); DEBUG("vol=%p refs=%d", vol, vol->refs); @@ -9016,7 +9016,7 @@ virStorageVolGetInfo(virStorageVolPtr vol, if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibStorageVolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9065,7 +9065,7 @@ virStorageVolGetXMLDesc(virStorageVolPtr vol, if (!VIR_IS_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (flags != 0) { virLibStorageVolError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9113,7 +9113,7 @@ virStorageVolGetPath(virStorageVolPtr vol) if (!VIR_IS_STORAGE_VOL(vol)) { virLibStorageVolError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = vol->conn; @@ -9157,7 +9157,7 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (flags != 0) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9209,7 +9209,7 @@ virNodeListDevices(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if ((flags != 0) || (names == NULL) || (maxnames < 0)) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9460,13 +9460,13 @@ int virNodeDeviceFree(virNodeDevicePtr dev) if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) { virLibNodeDeviceError(VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (virUnrefNodeDevice(dev) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return(0); + return 0; } @@ -9493,7 +9493,7 @@ virNodeDeviceRef(virNodeDevicePtr dev) if ((!VIR_IS_CONNECTED_NODE_DEVICE(dev))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&dev->conn->lock); DEBUG("dev=%p refs=%d", dev, dev->refs); @@ -9531,7 +9531,7 @@ virNodeDeviceDettach(virNodeDevicePtr dev) if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) { virLibNodeDeviceError(VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dev->conn->driver->nodeDeviceDettach) { @@ -9546,7 +9546,7 @@ virNodeDeviceDettach(virNodeDevicePtr dev) error: virDispatchError(dev->conn); - return (-1); + return -1; } /** @@ -9574,7 +9574,7 @@ virNodeDeviceReAttach(virNodeDevicePtr dev) if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) { virLibNodeDeviceError(VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dev->conn->driver->nodeDeviceReAttach) { @@ -9589,7 +9589,7 @@ virNodeDeviceReAttach(virNodeDevicePtr dev) error: virDispatchError(dev->conn); - return (-1); + return -1; } /** @@ -9619,7 +9619,7 @@ virNodeDeviceReset(virNodeDevicePtr dev) if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) { virLibNodeDeviceError(VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dev->conn->driver->nodeDeviceReset) { @@ -9634,7 +9634,7 @@ virNodeDeviceReset(virNodeDevicePtr dev) error: virDispatchError(dev->conn); - return (-1); + return -1; } @@ -9709,7 +9709,7 @@ virNodeDeviceDestroy(virNodeDevicePtr dev) if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) { virLibNodeDeviceError(VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dev->conn->flags & VIR_CONNECT_RO) { @@ -9774,7 +9774,7 @@ virConnectDomainEventRegister(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (cb == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9820,7 +9820,7 @@ virConnectDomainEventDeregister(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (cb == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -9969,7 +9969,7 @@ virSecretLookupByUUID(virConnectPtr conn, const unsigned char *uuid) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuid == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -10014,7 +10014,7 @@ virSecretLookupByUUIDString(virConnectPtr conn, const char *uuidstr) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuidstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -10059,7 +10059,7 @@ virSecretLookupByUsage(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (usageID == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -10189,7 +10189,7 @@ virSecretGetUUIDString(virSecretPtr secret, char *buf) if (!VIR_IS_SECRET(secret)) { virLibSecretError(VIR_ERR_INVALID_SECRET, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (buf == NULL) { virLibSecretError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -10200,7 +10200,7 @@ virSecretGetUUIDString(virSecretPtr secret, char *buf) goto error; virUUIDFormat(uuid, buf); - return (0); + return 0; error: virDispatchError(secret->conn); @@ -10230,9 +10230,9 @@ virSecretGetUsageType(virSecretPtr secret) if (!VIR_IS_SECRET(secret)) { virLibSecretError(VIR_ERR_INVALID_SECRET, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } - return (secret->usageType); + return secret->usageType; } /** @@ -10261,9 +10261,9 @@ virSecretGetUsageID(virSecretPtr secret) if (!VIR_IS_SECRET(secret)) { virLibSecretError(VIR_ERR_INVALID_SECRET, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (secret->usageID); + return secret->usageID; } @@ -10551,7 +10551,7 @@ virStreamNew(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } st = virGetStream(conn); @@ -10579,7 +10579,7 @@ virStreamRef(virStreamPtr stream) if ((!VIR_IS_CONNECTED_STREAM(stream))) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); virDispatchError(NULL); - return(-1); + return -1; } virMutexLock(&stream->conn->lock); DEBUG("stream=%p refs=%d", stream, stream->refs); @@ -10664,7 +10664,7 @@ int virStreamSend(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -10759,7 +10759,7 @@ int virStreamRecv(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -10835,7 +10835,7 @@ int virStreamSendAll(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->flags & VIR_STREAM_NONBLOCK) { @@ -10932,7 +10932,7 @@ int virStreamRecvAll(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->flags & VIR_STREAM_NONBLOCK) { @@ -11004,7 +11004,7 @@ int virStreamEventAddCallback(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -11046,7 +11046,7 @@ int virStreamEventUpdateCallback(virStreamPtr stream, if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -11082,7 +11082,7 @@ int virStreamEventRemoveCallback(virStreamPtr stream) if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -11125,7 +11125,7 @@ int virStreamFinish(virStreamPtr stream) if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -11166,7 +11166,7 @@ int virStreamAbort(virStreamPtr stream) if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (stream->driver && @@ -11208,16 +11208,16 @@ int virStreamFree(virStreamPtr stream) if (!VIR_IS_CONNECTED_STREAM(stream)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } /* XXX Enforce shutdown before free'ing resources ? */ if (virUnrefStream(stream) < 0) { virDispatchError(NULL); - return (-1); + return -1; } - return (0); + return 0; } @@ -11238,7 +11238,7 @@ int virDomainIsActive(virDomainPtr dom) if (!VIR_IS_CONNECTED_DOMAIN(dom)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dom->conn->driver->domainIsActive) { int ret; @@ -11272,7 +11272,7 @@ int virDomainIsPersistent(virDomainPtr dom) if (!VIR_IS_CONNECTED_DOMAIN(dom)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dom->conn->driver->domainIsPersistent) { int ret; @@ -11305,7 +11305,7 @@ int virDomainIsUpdated(virDomainPtr dom) if (!VIR_IS_CONNECTED_DOMAIN(dom)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dom->conn->driver->domainIsUpdated) { int ret; @@ -11338,7 +11338,7 @@ int virNetworkIsActive(virNetworkPtr net) if (!VIR_IS_CONNECTED_NETWORK(net)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (net->conn->networkDriver->networkIsActive) { int ret; @@ -11373,7 +11373,7 @@ int virNetworkIsPersistent(virNetworkPtr net) if (!VIR_IS_CONNECTED_NETWORK(net)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (net->conn->networkDriver->networkIsPersistent) { int ret; @@ -11407,7 +11407,7 @@ int virStoragePoolIsActive(virStoragePoolPtr pool) if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (pool->conn->storageDriver->poolIsActive) { int ret; @@ -11442,7 +11442,7 @@ int virStoragePoolIsPersistent(virStoragePoolPtr pool) if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (pool->conn->storageDriver->poolIsPersistent) { int ret; @@ -11561,7 +11561,7 @@ virNWFilterLookupByName(virConnectPtr conn, const char *name) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (name == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -11603,7 +11603,7 @@ virNWFilterLookupByUUID(virConnectPtr conn, const unsigned char *uuid) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuid == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -11646,7 +11646,7 @@ virNWFilterLookupByUUIDString(virConnectPtr conn, const char *uuidstr) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (uuidstr == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -11712,9 +11712,9 @@ virNWFilterGetName(virNWFilterPtr nwfilter) if (!VIR_IS_NWFILTER(nwfilter)) { virLibNWFilterError(VIR_ERR_INVALID_NWFILTER, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } - return (nwfilter->name); + return nwfilter->name; } /** @@ -11812,7 +11812,7 @@ virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (xmlDesc == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -11907,7 +11907,7 @@ virNWFilterGetXMLDesc(virNWFilterPtr nwfilter, int flags) if (!VIR_IS_CONNECTED_NWFILTER(nwfilter)) { virLibNWFilterError(VIR_ERR_INVALID_NWFILTER, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } if (flags != 0) { virLibNWFilterError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -11982,7 +11982,7 @@ int virInterfaceIsActive(virInterfacePtr iface) if (!VIR_IS_CONNECTED_INTERFACE(iface)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (iface->conn->interfaceDriver->interfaceIsActive) { int ret; @@ -12016,7 +12016,7 @@ int virConnectIsEncrypted(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->driver->isEncrypted) { int ret; @@ -12053,7 +12053,7 @@ int virConnectIsSecure(virConnectPtr conn) if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (conn->driver->isSecure) { int ret; @@ -12195,7 +12195,7 @@ virDomainGetJobInfo(virDomainPtr domain, virDomainJobInfoPtr info) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (info == NULL) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -12244,7 +12244,7 @@ virDomainAbortJob(virDomainPtr domain) if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } conn = domain->conn; @@ -12365,13 +12365,13 @@ virConnectDomainEventRegisterAny(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (dom != NULL && !(VIR_IS_CONNECTED_DOMAIN(dom) && dom->conn == conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(conn); - return (-1); + return -1; } if (eventID < 0 || eventID >= VIR_DOMAIN_EVENT_ID_LAST || cb == NULL) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -12413,7 +12413,7 @@ virConnectDomainEventDeregisterAny(virConnectPtr conn, if (!VIR_IS_CONNECT(conn)) { virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__); virDispatchError(NULL); - return (-1); + return -1; } if (callbackID < 0) { virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -12644,7 +12644,7 @@ virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, virLibDomainSnapshotError(VIR_ERR_INVALID_DOMAIN_SNAPSHOT, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = snapshot->domain->conn; @@ -12784,7 +12784,7 @@ virDomainSnapshotLookupByName(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = domain->conn; @@ -12871,7 +12871,7 @@ virDomainSnapshotCurrent(virDomainPtr domain, if (!VIR_IS_CONNECTED_DOMAIN(domain)) { virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); virDispatchError(NULL); - return (NULL); + return NULL; } conn = domain->conn; -- 1.7.3.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list