summaryrefslogtreecommitdiff
path: root/rpmdb/rpmdb.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-08-03 15:17:55 +0000
committerjbj <devnull@localhost>2001-08-03 15:17:55 +0000
commitdce5aa0ebd1a784ad8db04e07c7c2347e450160e (patch)
tree1f67c5a9a16a1e74c466153ce4297a27d6388690 /rpmdb/rpmdb.c
parent46d2e8bbd870dce29f43af7c67f50c97754975bd (diff)
downloadlibrpm-tizen-dce5aa0ebd1a784ad8db04e07c7c2347e450160e.tar.gz
librpm-tizen-dce5aa0ebd1a784ad8db04e07c7c2347e450160e.tar.bz2
librpm-tizen-dce5aa0ebd1a784ad8db04e07c7c2347e450160e.zip
lclint clean again.
CVS patchset: 5001 CVS date: 2001/08/03 15:17:55
Diffstat (limited to 'rpmdb/rpmdb.c')
-rw-r--r--rpmdb/rpmdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index adb4d05cb..d13fc79dc 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -1181,6 +1181,9 @@ int rpmdbCountPackages(rpmdb db, const char * name)
int rc = -1;
int xx;
+ if (db == NULL)
+ return 0;
+
/* XXX
* There's a segfault here with CDB access, let's treat the symptom
* while diagnosing the disease.
@@ -2234,6 +2237,9 @@ int rpmdbRemove(rpmdb rpmdb, /*@unused@*/ int rid, unsigned int hdrNum)
Header h;
sigset_t signalMask;
+ if (rpmdb == NULL)
+ return 0;
+
{ rpmdbMatchIterator mi;
mi = rpmdbInitIterator(rpmdb, RPMDBI_PACKAGES, &hdrNum, sizeof(hdrNum));
h = rpmdbNextIterator(mi);
@@ -2448,6 +2454,9 @@ int rpmdbAdd(rpmdb rpmdb, int iid, Header h)
int rc = 0;
int xx;
+ if (rpmdb == NULL)
+ return 0;
+
if (iid != 0 && iid != -1) {
int_32 tid = iid;
(void) headerRemoveEntry(h, RPMTAG_REMOVETID);