summaryrefslogtreecommitdiff
path: root/rpmdb/fprint.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-05-17 21:08:39 +0000
committerjbj <devnull@localhost>2002-05-17 21:08:39 +0000
commit38385c8d6323e3695e0b267ab7b2fcffff9f72b3 (patch)
tree75b5726cc79eb90a18d3ab94cd2d9e2bffa11630 /rpmdb/fprint.c
parent076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf (diff)
downloadlibrpm-tizen-38385c8d6323e3695e0b267ab7b2fcffff9f72b3.tar.gz
librpm-tizen-38385c8d6323e3695e0b267ab7b2fcffff9f72b3.tar.bz2
librpm-tizen-38385c8d6323e3695e0b267ab7b2fcffff9f72b3.zip
Transactions made increasingly opaque.
CVS patchset: 5438 CVS date: 2002/05/17 21:08:39
Diffstat (limited to 'rpmdb/fprint.c')
-rw-r--r--rpmdb/fprint.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/rpmdb/fprint.c b/rpmdb/fprint.c
index d6da7cf03..b0a51e351 100644
--- a/rpmdb/fprint.c
+++ b/rpmdb/fprint.c
@@ -20,10 +20,11 @@ fingerPrintCache fpCacheCreate(int sizeHint)
return fpc;
}
-void fpCacheFree(fingerPrintCache cache)
+fingerPrintCache fpCacheFree(fingerPrintCache cache)
{
- htFree(cache->ht);
+ cache->ht = htFree(cache->ht);
free(cache);
+ return NULL;
}
/**
@@ -137,7 +138,6 @@ static fingerPrint doLookup(fingerPrintCache cache,
strcpy(dn, (*buf != '\0' ? buf : "/"));
newEntry->ino = sb.st_ino;
newEntry->dev = sb.st_dev;
- newEntry->isFake = 0;
newEntry->dirName = dn;
fp.entry = newEntry;
@@ -158,7 +158,7 @@ static fingerPrint doLookup(fingerPrintCache cache,
fp.baseName = baseName;
if (!scareMemory && fp.subDir != NULL)
fp.subDir = xstrdup(fp.subDir);
- /*@-compdef@*/ /* FIX: fp.entry.{dirName,dev,ino,isFake} undef @*/
+ /*@-compdef@*/ /* FIX: fp.entry.{dirName,dev,ino} undef @*/
return fp;
/*@=compdef@*/
}
@@ -177,7 +177,7 @@ static fingerPrint doLookup(fingerPrintCache cache,
/*@notreached@*/
- /*@-compdef@*/ /* FIX: fp.entry.{dirName,dev,ino,isFake} undef @*/
+ /*@-compdef@*/ /* FIX: fp.entry.{dirName,dev,ino} undef @*/
/*@-nullret@*/ return fp; /*@=nullret@*/ /* LCL: can't happen. */
/*@=compdef@*/
}
@@ -244,7 +244,17 @@ void fpLookupList(fingerPrintCache cache, const char ** dirNames,
}
}
+#ifdef UNUSED
+/**
+ * Return finger prints of all file names in header.
+ * @warning: scareMemory is assumed!
+ * @param cache pointer to fingerprint cache
+ * @param h package header
+ * @retval fpList pointer to array of finger prints
+ */
+static
void fpLookupHeader(fingerPrintCache cache, Header h, fingerPrint * fpList)
+ /*@modifies h, cache, *fpList @*/;
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
@@ -263,3 +273,4 @@ void fpLookupHeader(fingerPrintCache cache, Header h, fingerPrint * fpList)
dirNames = hfd(dirNames, dnt);
baseNames = hfd(baseNames, bnt);
}
+#endif