diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-22 16:37:12 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-22 16:37:12 +0300 |
commit | f7e058a01ea288d1c6810562b1238c05bfaa30bc (patch) | |
tree | 197642cdebb9a7d79250d30b5859a22f79740c01 | |
parent | 447e80f96a26ee4e79cdca87daa38e93c655cc2f (diff) | |
download | rpm-f7e058a01ea288d1c6810562b1238c05bfaa30bc.tar.gz rpm-f7e058a01ea288d1c6810562b1238c05bfaa30bc.tar.bz2 rpm-f7e058a01ea288d1c6810562b1238c05bfaa30bc.zip |
Eliminate separate fileIndexEntry from rpmal
- This is exactly the same structure as availableIndexEntry, no need
for a different struct for it.
-rw-r--r-- | lib/rpmal.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c index 7ad1e8c0f..2f934c7d5 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -27,32 +27,19 @@ struct availablePackage_s { rpmfi fi; /*!< File info set. */ }; -typedef struct availableIndexEntry_s * availableIndexEntry; - /** \ingroup rpmdep * A single available item (e.g. a Provides: dependency). */ -struct availableIndexEntry_s { +typedef struct availableIndexEntry_s { rpmalNum pkgNum; /*!< Containing package index. */ unsigned int entryIx; /*!< Dependency index. */ -}; +} * availableIndexEntry; struct fileNameEntry_s { const char * dirName; const char * baseName; }; - -/** \ingroup rpmdep - * A file to be installed/removed. - */ -typedef struct fileIndexEntry_s * fileIndex; - -struct fileIndexEntry_s { - rpmalNum pkgNum; /*!< Containing package index. */ - unsigned int entryIx; -}; - #undef HASHTYPE #undef HTKEYTYPE #undef HTDATATYPE @@ -67,12 +54,10 @@ struct fileIndexEntry_s { #undef HTDATATYPE #define HASHTYPE rpmalFileHash #define HTKEYTYPE struct fileNameEntry_s -#define HTDATATYPE struct fileIndexEntry_s +#define HTDATATYPE struct availableIndexEntry_s #include "lib/rpmhash.H" #include "lib/rpmhash.C" - - /** \ingroup rpmdep * Set of available packages, items, and directories. */ @@ -171,7 +156,7 @@ void rpmalDel(rpmal al, rpmte p) static void rpmalAddFiles(rpmal al, rpmalNum pkgNum, rpmfi fi){ struct fileNameEntry_s fileName; - struct fileIndexEntry_s fileEntry; + struct availableIndexEntry_s fileEntry; int i; rpm_color_t ficolor; @@ -278,7 +263,7 @@ static rpmte * rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds) /* Split path into dirname and basename components for lookup */ if ((slash = strrchr(fileName, '/')) != NULL) { - fileIndex result; + availableIndexEntry result; int resultCnt = 0; size_t bnStart = (slash - fileName) + 1; char dirName[bnStart + 1]; |