#define XEN_SCHED_CREDIT_NPARAM 2
-static libxlDriverPrivatePtr libxl_driver = NULL;
+static libxlDriverPrivatePtr libxl_driver;
/* Function declarations */
static int
return 0;
}
-static bool wantReboot = false;
+static bool wantReboot;
static virMutex lock = VIR_MUTEX_INITIALIZER;
/*
* openvz_util.c: core driver methods for managing OpenVZ VEs
*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013-2014 Red Hat, Inc.
* Copyright (C) 2012 Guido Günther
*
* This library is free software; you can redistribute it and/or
long
openvzKBPerPages(void)
{
- static long kb_per_pages = 0;
+ static long kb_per_pages;
if (kb_per_pages == 0) {
kb_per_pages = sysconf(_SC_PAGESIZE);
* URI: phyp://user@[hmc|ivm]/managed_system
* */
-static unsigned const int HMC = 0;
-static unsigned const int PHYP_IFACENAME_SIZE = 24;
-static unsigned const int PHYP_MAC_SIZE = 12;
+enum {
+ HMC = 0,
+ PHYP_IFACENAME_SIZE = 24,
+ PHYP_MAC_SIZE = 12,
+};
static int
waitsocket(int socket_fd, LIBSSH2_SESSION * session)
deserializeTypedParameters(__FUNCTION__, ret_params_val, ret_params_len, \
limit, params, nparams)
-static bool inside_daemon = false;
+static bool inside_daemon;
struct private_data {
virMutex lock;
"</device>";
static const unsigned long long defaultPoolCap = (100 * 1024 * 1024 * 1024ull);
-static const unsigned long long defaultPoolAlloc = 0;
+static const unsigned long long defaultPoolAlloc;
static int testStoragePoolObjSetDefaults(virStoragePoolObjPtr pool);
static int testNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info);
const char *cmd,
char **reply);
-static struct uml_driver *uml_driver = NULL;
+static struct uml_driver *uml_driver;
static int
umlVMFilterRebuild(virDomainObjListIterator iter, void *data)
* Global Variables *
*******************************************************************************/
/** The dlopen handle for VBoxXPCOMC. */
-static void *hVBoxXPCOMC = NULL;
+static void *hVBoxXPCOMC;
/** Pointer to the VBoxXPCOMC function table. */
-static PCVBOXXPCOM pVBoxFuncs_v2_2 = NULL;
+static PCVBOXXPCOM pVBoxFuncs_v2_2;
/** Pointer to VBoxGetXPCOMCFunctions for the loaded VBoxXPCOMC so/dylib/dll. */
PFNVBOXGETXPCOMCFUNCTIONS g_pfnGetFunctions = NULL;
* them that way
*/
-static vboxGlobalData *g_pVBoxGlobalData = NULL;
+static vboxGlobalData *g_pVBoxGlobalData;
#endif /* !(VBOX_API_VERSION == 2002000) */
int maplen);
-static bool is_privileged = false;
-static virSysinfoDefPtr hostsysinfo = NULL;
+static bool is_privileged;
+static virSysinfoDefPtr hostsysinfo;
static virDomainDefPtr xenGetDomainDefForID(virConnectPtr conn, int id)
{
# define SYS_IFACE_MIN_VERS_NUMA 4
#endif
-static int xen_ioctl_hypercall_cmd = 0;
+static int xen_ioctl_hypercall_cmd;
static struct xenHypervisorVersions hv_versions = {
.hv = 0,
.hypervisor = 2,
.dom_interface = -1,
};
-static int kb_per_pages = 0;
+static int kb_per_pages;
/* Regular expressions used by xenHypervisorGetCapabilities, and
* compiled once by xenHypervisorInit. Note that these are POSIX.2