diff options
author | jbj <devnull@localhost> | 2001-11-01 23:18:15 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-11-01 23:18:15 +0000 |
commit | b0e16172c3b42c758fd411650a8c2bbbf791a507 (patch) | |
tree | 7bd3d8466d96fdd1fd5c3b79c6aadfc18702f2f5 /lib/header.c | |
parent | fe68f3c0cd84698d54764fd24a1b91a28e8703f5 (diff) | |
download | rpm-b0e16172c3b42c758fd411650a8c2bbbf791a507.tar.gz rpm-b0e16172c3b42c758fd411650a8c2bbbf791a507.tar.bz2 rpm-b0e16172c3b42c758fd411650a8c2bbbf791a507.zip |
- depends.c: availablePackage is (almost) opaque.
CVS patchset: 5147
CVS date: 2001/11/01 23:18:15
Diffstat (limited to 'lib/header.c')
-rw-r--r-- | lib/header.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/header.c b/lib/header.c index a4298aac6..01556bd56 100644 --- a/lib/header.c +++ b/lib/header.c @@ -107,7 +107,9 @@ Header XheaderLink(Header h, const char * msg, const char * fn, unsigned ln) if (_h_debug) fprintf(stderr, "--> h %p ++ %d %s at %s:%u\n", h, (h != NULL ? h->nrefs : 0), msg, fn, ln); /*@=modfilesystem@*/ - /*@-refcounttrans@*/ return h; /*@=refcounttrans@*/ + /*@-refcounttrans -nullret @*/ + return h; + /*@=refcounttrans =nullret @*/ } /** \ingroup header @@ -124,7 +126,7 @@ Header XheaderUnlink(/*@killref@*/ /*@null@*/ Header h, if (_h_debug) fprintf(stderr, "--> h %p -- %d %s at %s:%u\n", h, (h != NULL ? h->nrefs : 0), msg, fn, ln); /*@=modfilesystem@*/ - h->nrefs--; + if (h != NULL) h->nrefs--; return NULL; } @@ -140,6 +142,7 @@ Header XheaderFree( /*@null@*/ /*@killref@*/ Header h, { (void) XheaderUnlink(h, msg, fn, ln); + /*@-usereleased@*/ if (h == NULL || h->nrefs > 0) return NULL; /* XXX return previous header? */ @@ -163,6 +166,7 @@ Header XheaderFree( /*@null@*/ /*@killref@*/ Header h, /*@-refcounttrans@*/ h = _free(h); /*@=refcounttrans@*/ return h; + /*@=usereleased@*/ } /** \ingroup header |