summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-07-29 17:05:41 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-07-29 17:05:41 +0200
commit99561425a915178f3f747f0d32dd13862b069098 (patch)
tree3839698129e274f84f9287233b0b61af488c52e7 /lib/Plugins/CCpp.cpp
parentc91bb0a0e321ed5eae01ae3e649895e7d57726eb (diff)
two trivial fixlets in lib/Plugins/CCpp.cpp
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 47bfceba..1d442d6a 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -183,8 +183,8 @@ void CAnalyzerCCpp::InstallDebugInfos(const std::string& pPackage)
}
if (strstr(buff, "Total download size") != NULL)
{
- int r = write(pipein[1], "y\n", sizeof("y\n"));
- if (r != sizeof("y\n"))
+ int r = write(pipein[1], "y\n", sizeof("y\n")-1);
+ if (r != sizeof("y\n")-1)
{
close(pipein[1]);
close(pipeout[0]);
@@ -466,14 +466,13 @@ std::string CAnalyzerCCpp::GetLocalUUID(const std::string& pDebugDumpDir)
std::string core = "--core="+ pDebugDumpDir + "/" +FILENAME_COREDUMP;
char* command = (char*)"eu-unstrip";
char* args[4] = { (char*)"eu-unstrip", NULL, (char*)"-n", NULL };
- args[1] = strdup(core.c_str());
+ args[1] = (char*)core.c_str();
dd.Open(pDebugDumpDir);
dd.LoadText(FILENAME_UID, UID);
dd.LoadText(FILENAME_EXECUTABLE, executable);
dd.LoadText(FILENAME_PACKAGE, package);
ExecVP(command, args, atoi(UID.c_str()), buildIdPC);
dd.Close();
- free(args[1]);
GetIndependentBuildIdPC(buildIdPC, independentBuildIdPC);
return CreateHash(package + executable + independentBuildIdPC);
}