summaryrefslogtreecommitdiff
path: root/lib/rpmal.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2005-01-04 17:11:00 +0000
committerjbj <devnull@localhost>2005-01-04 17:11:00 +0000
commit228d0e350ac2f20ee7ca1f74c46620e219559542 (patch)
treef4fb9f7fff14e3c3034db9ec833defcc834ffa82 /lib/rpmal.c
parent34caf4357ac173eb273ec16611dc8da24fa75858 (diff)
downloadlibrpm-tizen-228d0e350ac2f20ee7ca1f74c46620e219559542.tar.gz
librpm-tizen-228d0e350ac2f20ee7ca1f74c46620e219559542.tar.bz2
librpm-tizen-228d0e350ac2f20ee7ca1f74c46620e219559542.zip
Splint fiddles.
CVS patchset: 7669 CVS date: 2005/01/04 17:11:00
Diffstat (limited to 'lib/rpmal.c')
-rw-r--r--lib/rpmal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c
index f7272183e..2527bcbec 100644
--- a/lib/rpmal.c
+++ b/lib/rpmal.c
@@ -78,7 +78,7 @@ typedef /*@abstract@*/ struct fileIndexEntry_s * fileIndexEntry;
* A file to be installed/removed.
*/
struct fileIndexEntry_s {
-/*@dependent@*/ /*@null@*/
+/*@dependent@*/ /*@relnull@*/
const char * baseName; /*!< File basename. */
int baseNameLen;
alNum pkgNum; /*!< Containing package index. */
@@ -92,7 +92,7 @@ typedef /*@abstract@*/ struct dirInfo_s * dirInfo;
* A directory to be installed/removed.
*/
struct dirInfo_s {
-/*@owned@*/ /*@null@*/
+/*@owned@*/ /*@relnull@*/
const char * dirName; /*!< Directory path (+ trailing '/'). */
int dirNameLen; /*!< No. bytes in directory path. */
/*@owned@*/
@@ -482,11 +482,12 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, pkgNum, tscolor);
for (dx = 0; dx < dc; dx++) {
(void) rpmfiSetDX(fi, dx);
DN = rpmfiDN(fi);
+ if (DN != NULL)
for (i = 0; i < dx; i++) {
const char * iDN;
(void) rpmfiSetDX(fi, i);
iDN = rpmfiDN(fi);
- if (!strcmp(DN, iDN))
+ if (iDN != NULL && !strcmp(DN, iDN))
/*@innerbreak@*/ break;
}
dirUnique[dx] = i;