summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Firefox.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-21 18:45:21 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-21 18:45:21 +0100
commit8cf58297d9743bdbfdddb605cc9cefe0c6273ee5 (patch)
tree852586ab7596bd0225a586413b6baafddc6b682b /lib/Plugins/Firefox.cpp
parentfdfcf65903c2f1f3abc7dd4cabb9cf7d170669a1 (diff)
downloadabrt-8cf58297d9743bdbfdddb605cc9cefe0c6273ee5.tar.gz
abrt-8cf58297d9743bdbfdddb605cc9cefe0c6273ee5.tar.xz
abrt-8cf58297d9743bdbfdddb605cc9cefe0c6273ee5.zip
TicketUploader and FileTransfer plugins: fixes after a round of testing
for one, FileTransfer now would not use current dir as a storage for temp files. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/Firefox.cpp')
-rw-r--r--lib/Plugins/Firefox.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp
index e8b12f5..98d892b 100644
--- a/lib/Plugins/Firefox.cpp
+++ b/lib/Plugins/Firefox.cpp
@@ -623,9 +623,7 @@ Another application is holding the yum lock, cannot continue
std::string packageName = package.substr(0, package.rfind("-", package.rfind("-")-1));
while (fgets(buff, sizeof(buff), pipeout_fp))
{
- int last = strlen(buff) - 1;
- if (last >= 0 && buff[last] == '\n')
- buff[last] = '\0';
+ strchrnul(buff, '\n')[0] = '\0';
log("%s", buff);
update_client("%s", buff); /* maybe only if buff != ""? */
@@ -712,9 +710,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
char buff[1024];
while (fgets(buff, sizeof(buff), pipeout_fp))
{
- int last = strlen(buff) - 1;
- if (last >= 0 && buff[last] == '\n')
- buff[last] = '\0';
+ strchrnul(buff, '\n')[0] = '\0';
if (strncmp(buff, "MISSING:", 8) == 0)
{