initialize prefix and prefixLen
authorroot <devnull@localhost>
Wed, 10 Jul 1996 01:38:44 +0000 (01:38 +0000)
committerroot <devnull@localhost>
Wed, 10 Jul 1996 01:38:44 +0000 (01:38 +0000)
CVS patchset: 754
CVS date: 1996/07/10 01:38:44

build/pack.c

index ee8f747..f2ce381 100644 (file)
@@ -407,8 +407,13 @@ int packageBinaries(Spec s, char *passPhrase)
        }
        if (! *prefix) {
            prefix = NULL;
+           prefixLen = 0;
+       } else {
+           prefixLen = strlen(prefix);
        }
-       prefixLen = strlen(prefix);
+    } else {
+       prefix = NULL;
+       prefixLen = 0;
     }
     
     /* Look through for each package */
@@ -496,7 +501,7 @@ int packageBinaries(Spec s, char *passPhrase)
        }
        
        /**** Process the file list ****/
-       
+
        if (process_filelist(outHeader, pr, pr->filelist, &size, nametmp,
                             packageVersion, packageRelease, RPMLEAD_BINARY,
                             prefix)) {