summaryrefslogtreecommitdiff
path: root/lib/rpmds.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-12-30 14:50:33 +0000
committerjbj <devnull@localhost>2002-12-30 14:50:33 +0000
commitbe48ddd9e2f81fa2a3d224d1d7de0c532abf6c9d (patch)
tree62bdae7e1ecfc72d1deb1580d7991372b917030e /lib/rpmds.c
parent24e9464d2e30b02b4178198947b45fb45c165cbb (diff)
downloadlibrpm-tizen-be48ddd9e2f81fa2a3d224d1d7de0c532abf6c9d.tar.gz
librpm-tizen-be48ddd9e2f81fa2a3d224d1d7de0c532abf6c9d.tar.bz2
librpm-tizen-be48ddd9e2f81fa2a3d224d1d7de0c532abf6c9d.zip
- fix: typo in assertion.
CVS patchset: 5988 CVS date: 2002/12/30 14:50:33
Diffstat (limited to 'lib/rpmds.c')
-rw-r--r--lib/rpmds.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/rpmds.c b/lib/rpmds.c
index 7d05e5358..e2afe5060 100644
--- a/lib/rpmds.c
+++ b/lib/rpmds.c
@@ -490,12 +490,12 @@ int_32 rpmdsSetColor(const rpmds ds, int_32 color)
int_32 ocolor = 0;
if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
+/*@-bounds@*/
if (ds->Color != NULL) {
ocolor = ds->Color[ds->i];
ds->Color[ds->i] = color;
}
-/*@=boundsread@*/
+/*@=bounds@*/
}
return ocolor;
}
@@ -518,12 +518,12 @@ int_32 rpmdsSetRefs(const rpmds ds, int_32 refs)
int_32 orefs = 0;
if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
+/*@-bounds@*/
if (ds->Refs != NULL) {
orefs = ds->Refs[ds->i];
ds->Refs[ds->i] = refs;
}
-/*@=boundsread@*/
+/*@=bounds@*/
}
return orefs;
}
@@ -581,7 +581,8 @@ rpmds rpmdsInit(/*@null@*/ rpmds ds)
}
/*@-bounds@*/
-static const char ** rpmdsDupArgv(const char ** argv, int argc)
+static /*@null@*/
+const char ** rpmdsDupArgv(/*@null@*/ const char ** argv, int argc)
/*@*/
{
const char ** av;
@@ -589,6 +590,8 @@ static const char ** rpmdsDupArgv(const char ** argv, int argc)
int ac = 0;
char * t;
+ if (argv == NULL)
+ return NULL;
for (ac = 0; ac < argc; ac++) {
assert(argv[ac] != NULL);
nb += strlen(argv[ac]) + 1;
@@ -629,9 +632,8 @@ static rpmds rpmdsDup(const rpmds ods)
ds->Nt = ods->Nt;
/* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
-/*@-nullderef -nullpass@*/
-assert(ds->EVR != NULL);
-assert(ds->Flags != NULL);
+assert(ods->EVR != NULL);
+assert(ods->Flags != NULL);
nb = (ds->Count+1) * sizeof(*ds->EVR);
ds->EVR = (ds->h != NULL
@@ -644,7 +646,6 @@ assert(ds->Flags != NULL);
? ods->Flags
: memcpy(xmalloc(nb), ods->Flags, nb) );
ds->Ft = ods->Ft;
-/*@=nullderef =nullpass@*/
/*@-compmempass@*/ /* FIX: ds->Flags is kept, not only */
return rpmdsLink(ds, (ds ? ds->Type : NULL));
@@ -731,9 +732,9 @@ save = ods->i;
ds->N = N;
/* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
-/*@-nullderef@*/
-assert(ds->EVR != NULL);
-assert(ds->Flags != NULL);
+/*@-nullderef -nullpass -nullptrarith @*/
+assert(ods->EVR != NULL);
+assert(ods->Flags != NULL);
for (j = ds->Count; j > ds->u; j--)
ds->EVR[j] = ds->EVR[j-1];
@@ -750,7 +751,7 @@ assert(ds->Flags != NULL);
Flags[ds->u] = ods->Flags[ods->i];
ds->Flags = _free(ds->Flags);
ds->Flags = Flags;
-/*@=nullderef@*/
+/*@=nullderef =nullpass =nullptrarith @*/
ds->i = ds->Count;
ds->Count++;