accept NULL as a valid prefix in rpmdbOpen()

CVS patchset: 1974
CVS date: 1998/01/20 02:41:18
This commit is contained in:
ewt 1998-01-20 02:41:18 +00:00
parent f36e7608ea
commit 01c24328af
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ int openDatabase(char * prefix, char * dbpath, rpmdb *rpmdbp, int mode,
int i;
struct flock lockinfo;
/* we should accept NULL as a valid prefix */
if (!prefix) prefix="";
i = strlen(dbpath);
if (dbpath[i - 1] != '/') {
filename = alloca(i + 2);