diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 12:49:46 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 12:49:46 +0300 |
commit | e639f57d436f9f858dfdff79c2d8c868d935db79 (patch) | |
tree | e28f185d954abea89923d9f79346624302576eb8 | |
parent | d4879f3e6e2ab65e1ad76869896cf407248bc993 (diff) | |
download | rpm-e639f57d436f9f858dfdff79c2d8c868d935db79.tar.gz rpm-e639f57d436f9f858dfdff79c2d8c868d935db79.tar.bz2 rpm-e639f57d436f9f858dfdff79c2d8c868d935db79.zip |
Move rpmHeaderTagFunc() a bit to avoid unnecessary forward declaration
-rw-r--r-- | lib/tagexts.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lib/tagexts.c b/lib/tagexts.c index 9249dd04f..48b403700 100644 --- a/lib/tagexts.c +++ b/lib/tagexts.c @@ -19,9 +19,6 @@ struct headerTagFunc_s { headerTagTagFunction func; /*!< Pointer to formatter function. */ }; -/* forward declarations */ -static const struct headerTagFunc_s rpmHeaderTagExtensions[]; - /** \ingroup rpmfi * Retrieve file names from header. * @@ -715,20 +712,6 @@ static int filestatusTag(Header h, rpmtd td, headerGetFlags hgflags) return (fc > 0); } -headerTagTagFunction rpmHeaderTagFunc(rpmTag tag) -{ - const struct headerTagFunc_s * ext; - headerTagTagFunction func = NULL; - - for (ext = rpmHeaderTagExtensions; ext->func != NULL; ext++) { - if (ext->tag == tag) { - func = ext->func; - break; - } - } - return func; -} - static const struct headerTagFunc_s rpmHeaderTagExtensions[] = { { RPMTAG_GROUP, groupTag }, { RPMTAG_DESCRIPTION, descriptionTag }, @@ -758,3 +741,17 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = { { 0, NULL } }; +headerTagTagFunction rpmHeaderTagFunc(rpmTag tag) +{ + const struct headerTagFunc_s * ext; + headerTagTagFunction func = NULL; + + for (ext = rpmHeaderTagExtensions; ext->func != NULL; ext++) { + if (ext->tag == tag) { + func = ext->func; + break; + } + } + return func; +} + |