]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Remove two unused PATH_MAX-sized char arrays from the stack
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 15 Jan 2011 16:38:57 +0000 (17:38 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 18 Jan 2011 22:14:37 +0000 (23:14 +0100)
src/storage/storage_driver.c
src/uml/uml_driver.c

index 67d043bc8f6d6306e9c34effb1bb29b5fd402077..5373025535726be6c1145f8c1052d7f0f2cc7a11 100644 (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)
index 57f50f6d879a943aec648fc3c1350a3c3605d839..ef2a5b6244d2ba8c78009db7f8c92e76f9631008 100644 (file)
@@ -342,10 +342,10 @@ cleanup:
  * Initialization function for the Uml daemon
  */
 static int
-umlStartup(int privileged) {
+umlStartup(int privileged)
+{
     uid_t uid = geteuid();
     char *base = NULL;
-    char driverConf[PATH_MAX];
     char *userdir = NULL;
 
     if (VIR_ALLOC(uml_driver) < 0)
@@ -398,10 +398,6 @@ umlStartup(int privileged) {
     /* Configuration paths are either ~/.libvirt/uml/... (session) or
      * /etc/libvirt/uml/... (system).
      */
-    if (snprintf (driverConf, sizeof(driverConf), "%s/uml.conf", base) == -1)
-        goto out_of_memory;
-    driverConf[sizeof(driverConf)-1] = '\0';
-
     if (virAsprintf(&uml_driver->configDir, "%s/uml", base) == -1)
         goto out_of_memory;