Remove two unused PATH_MAX-sized char arrays from the stack

This commit is contained in:
Matthias Bolte
2011-01-15 17:38:57 +01:00
parent e065e1ea04
commit 915bc7421e
2 changed files with 4 additions and 20 deletions

View File

@@ -127,9 +127,9 @@ storageDriverAutostart(virStorageDriverStatePtr driver) {
* Initialization function for the QEmu daemon
*/
static int
storageDriverStartup(int privileged) {
storageDriverStartup(int privileged)
{
char *base = NULL;
char driverConf[PATH_MAX];
if (VIR_ALLOC(driverState) < 0)
return -1;
@@ -160,11 +160,6 @@ storageDriverStartup(int privileged) {
/* Configuration paths are either ~/.libvirt/storage/... (session) or
* /etc/libvirt/storage/... (system).
*/
if (snprintf (driverConf, sizeof(driverConf),
"%s/storage.conf", base) == -1)
goto out_of_memory;
driverConf[sizeof(driverConf)-1] = '\0';
if (virAsprintf(&driverState->configDir,
"%s/storage", base) == -1)
goto out_of_memory;
@@ -175,13 +170,6 @@ storageDriverStartup(int privileged) {
VIR_FREE(base);
/*
if (virStorageLoadDriverConfig(driver, driverConf) < 0) {
virStorageDriverShutdown();
return -1;
}
*/
if (virStoragePoolLoadAllConfigs(&driverState->pools,
driverState->configDir,
driverState->autostartDir) < 0)