diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index eeebb4f6c9..d2c077cddc 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -76,7 +76,7 @@ VIR_LOG_INIT("libxl.libxl_driver"); #define XEN_SCHED_CREDIT_NPARAM 2 -static libxlDriverPrivatePtr libxl_driver = NULL; +static libxlDriverPrivatePtr libxl_driver; /* Function declarations */ static int diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1861dd6fdb..1e4b9bc170 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -819,7 +819,7 @@ static int lxcControllerClearCapabilities(void) return 0; } -static bool wantReboot = false; +static bool wantReboot; static virMutex lock = VIR_MUTEX_INITIALIZER; diff --git a/src/openvz/openvz_util.c b/src/openvz/openvz_util.c index 42143358e3..8032f6aa73 100644 --- a/src/openvz/openvz_util.c +++ b/src/openvz/openvz_util.c @@ -1,7 +1,7 @@ /* * 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 @@ -39,7 +39,7 @@ 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); diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index a56f25ddd7..09617c8fe5 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -68,9 +68,11 @@ VIR_LOG_INIT("phyp.phyp_driver"); * 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) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index b8d90ed43c..65c04d98c6 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -77,7 +77,7 @@ VIR_LOG_INIT("remote.remote_driver"); 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; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index f435d03a87..2afd6fe7f8 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -471,7 +471,7 @@ static const char *defaultNodeXML = ""; 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); diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 4f5f6e15ae..2baf2fa916 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -147,7 +147,7 @@ static int umlMonitorCommand(const struct uml_driver *driver, 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) diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c index d0c4a15ff8..aaa7c607b4 100644 --- a/src/vbox/vbox_XPCOMCGlue.c +++ b/src/vbox/vbox_XPCOMCGlue.c @@ -68,9 +68,9 @@ VIR_LOG_INIT("vbox.vbox_XPCOMCGlue"); * 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; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index acaada0229..b2e9ef4870 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -177,7 +177,7 @@ if (strUtf16) {\ * them that way */ -static vboxGlobalData *g_pVBoxGlobalData = NULL; +static vboxGlobalData *g_pVBoxGlobalData; #endif /* !(VBOX_API_VERSION == 2002000) */ diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index d0420507c6..5f7c98f010 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -91,8 +91,8 @@ xenUnifiedDomainGetVcpusInternal(virDomainPtr dom, 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) { diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index d3d4aea191..4be889108b 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -126,7 +126,7 @@ typedef privcmd_hypercall_t hypercall_t; # 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, @@ -134,7 +134,7 @@ static struct xenHypervisorVersions hv_versions = { .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