diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 10:45:36 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 10:45:36 +0200 |
commit | 083a82f7f159f8763b9904b32f08bfc58d0c7e40 (patch) | |
tree | f6ad8dfb84f55b6b71b0daae5c2dcaee239ea1a8 /rpmdb | |
parent | 75df2ea9ad1a44cc836e1c4f43a54ca679b03879 (diff) | |
download | librpm-tizen-083a82f7f159f8763b9904b32f08bfc58d0c7e40.tar.gz librpm-tizen-083a82f7f159f8763b9904b32f08bfc58d0c7e40.tar.bz2 librpm-tizen-083a82f7f159f8763b9904b32f08bfc58d0c7e40.zip |
Drop bogus const from headerFreeTag() data pointer
- no effect as it's hft is unused
- mark headerFreeData(), the real problem case, with _constfree() for
easy finding (inlined in header.h so can't use _constfree())
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/header.c | 2 | ||||
-rw-r--r-- | rpmdb/header.h | 6 | ||||
-rw-r--r-- | rpmdb/header_common.c | 3 | ||||
-rw-r--r-- | rpmdb/header_method.h | 3 |
4 files changed, 6 insertions, 8 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c index 52c02d6a5..9a9457b2c 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -1473,7 +1473,7 @@ static int intGetEntry(Header h, rpm_tag_t tag, * @return NULL always */ static void * _headerFreeTag(Header h, - const void * data, rpm_tagtype_t type) + void * data, rpm_tagtype_t type) { if (data) { if (type == -1 || diff --git a/rpmdb/header.h b/rpmdb/header.h index 1d49a2113..47a01fb6b 100644 --- a/rpmdb/header.h +++ b/rpmdb/header.h @@ -395,7 +395,7 @@ int headerIsEntry(Header h, rpm_tag_t tag); * @param type type of data (or -1 to force free) * @return NULL always */ -void * headerFreeTag(Header h, const void * data, rpm_tagtype_t type); +void * headerFreeTag(Header h, void * data, rpm_tagtype_t type); /** \ingroup header * Retrieve tag value. @@ -590,14 +590,14 @@ int headerNextIterator(HeaderIterator hi, * @return NULL always */ static inline -void * headerFreeData( const void * data, rpm_tagtype_t type) +void * headerFreeData(const void * data, rpm_tagtype_t type) { if (data) { if (type == RPM_FORCEFREE_TYPE || type == RPM_STRING_ARRAY_TYPE || type == RPM_I18NSTRING_TYPE || type == RPM_BIN_TYPE) - free((void *)data); + free((void *)data); /* XXX _constfree() */ } return NULL; } diff --git a/rpmdb/header_common.c b/rpmdb/header_common.c index 20f01232d..20ea4dcfd 100644 --- a/rpmdb/header_common.c +++ b/rpmdb/header_common.c @@ -101,8 +101,7 @@ int headerIsEntry(Header h, rpm_tag_t tag) return (h2hv(h)->hdrisentry) (h, tag); } -void * headerFreeTag(Header h, - const void * data, rpm_tagtype_t type) +void * headerFreeTag(Header h, void * data, rpm_tagtype_t type) { return (h2hv(h)->hdrfreetag) (h, data, type); } diff --git a/rpmdb/header_method.h b/rpmdb/header_method.h index b7c6f9ff7..74a33bf78 100644 --- a/rpmdb/header_method.h +++ b/rpmdb/header_method.h @@ -142,8 +142,7 @@ int (*HDRisentry) (Header h, rpm_tag_t tag); * @return NULL always */ typedef -void * (*HDRfreetag) (Header h, - const void * data, rpm_tagtype_t type); +void * (*HDRfreetag) (Header h, void * data, rpm_tagtype_t type); /** \ingroup header * Retrieve tag value. |