diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-15 19:13:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-15 19:13:58 +0200 |
commit | fbe358995978f60ad23ed86e71cfa8ba425b70eb (patch) | |
tree | fc4b490dea0483f493019a78c479f51b42a6d483 /src/Daemon/RPM.cpp | |
parent | 7b54a461ab5fde77ab74cebddecfb683a8fc504e (diff) | |
download | abrt-fbe358995978f60ad23ed86e71cfa8ba425b70eb.tar.gz abrt-fbe358995978f60ad23ed86e71cfa8ba425b70eb.tar.xz abrt-fbe358995978f60ad23ed86e71cfa8ba425b70eb.zip |
convert a few string& params to char*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/RPM.cpp')
-rw-r--r-- | src/Daemon/RPM.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Daemon/RPM.cpp b/src/Daemon/RPM.cpp index 51aa0dd4..4a819b5d 100644 --- a/src/Daemon/RPM.cpp +++ b/src/Daemon/RPM.cpp @@ -35,11 +35,11 @@ void CRPM::LoadOpenGPGPublicKey(const char* pFileName) free(pkt); } -bool CRPM::CheckFingerprint(const std::string& pPackage) +bool CRPM::CheckFingerprint(const char* pPackage) { bool ret = false; rpmts ts = rpmtsCreate(); - rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage.c_str(), 0); + rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage, 0); Header header = rpmdbNextIterator(iter); if (header != NULL) @@ -82,11 +82,11 @@ bool CRPM::CheckFingerprint(const std::string& pPackage) return ret; } -bool CheckHash(const std::string& pPackage, const std::string& pPath) +bool CheckHash(const char* pPackage, const char* pPath) { bool ret = false; rpmts ts = rpmtsCreate(); - rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage.c_str(), 0); + rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage, 0); Header header = rpmdbNextIterator(iter); if (header != NULL) { @@ -95,16 +95,16 @@ bool CheckHash(const std::string& pPackage, const std::string& pPath) std::string headerHash; char computedHash[1024] = ""; - while(rpmfiNext(fi) != -1) + while (rpmfiNext(fi) != -1) { - if (pPath == rpmfiFN(fi)) + if (strcmp(pPath, rpmfiFN(fi)) == 0) { headerHash = rpmfiFDigestHex(fi, &hashAlgo); } } rpmfiFree(fi); - rpmDoDigest(hashAlgo, pPath.c_str(), 1, (unsigned char*) computedHash, NULL); + rpmDoDigest(hashAlgo, pPath, 1, (unsigned char*) computedHash, NULL); if (headerHash != "" && headerHash == computedHash) { @@ -116,11 +116,11 @@ bool CheckHash(const std::string& pPackage, const std::string& pPath) return ret; } -std::string GetDescription(const std::string& pPackage) +std::string GetDescription(const char* pPackage) { std::string pDescription = ""; rpmts ts = rpmtsCreate(); - rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage.c_str(), 0); + rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage, 0); Header header = rpmdbNextIterator(iter); if (header != NULL) { @@ -137,11 +137,11 @@ std::string GetDescription(const std::string& pPackage) return pDescription; } -std::string GetComponent(const std::string& pFileName) +std::string GetComponent(const char* pFileName) { std::string ret = ""; rpmts ts = rpmtsCreate(); - rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName.c_str(), 0); + rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName, 0); Header header = rpmdbNextIterator(iter); if (header != NULL) { @@ -161,11 +161,11 @@ std::string GetComponent(const std::string& pFileName) return ret; } -std::string GetPackage(const std::string& pFileName) +std::string GetPackage(const char* pFileName) { std::string ret = ""; rpmts ts = rpmtsCreate(); - rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName.c_str(), 0); + rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName, 0); Header header = rpmdbNextIterator(iter); if (header != NULL) { |