From e6dc360038414a336be790bfbd4d56e9a35b48ba Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 8 Jul 2015 17:59:46 +0200 Subject: [PATCH] Avoid flushing the output stream in abipkgdiff.cc * tools/abipkgdiff.cc (extract_package) (create_maps_of_package_content, compare, main): Avoid flushing the output stream arbitrarily. Signed-off-by: Dodji Seketeli --- tools/abipkgdiff.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc index 272f34ab..bb427537 100644 --- a/tools/abipkgdiff.cc +++ b/tools/abipkgdiff.cc @@ -45,7 +45,6 @@ using std::cout; using std::cerr; -using std::endl; using std::string; using std::ostream; using std::vector; @@ -201,7 +200,7 @@ extract_package(const package& package) case abigail::tools_utils::FILE_TYPE_RPM: if (!extract_rpm(package.path, package.extracted_package_dir_path)) { - cerr << "Error while extracting package" << package.path << endl; + cerr << "Error while extracting package" << package.path << "\n"; return false; } return true; @@ -252,7 +251,7 @@ create_maps_of_package_content(package& package) 16)) { cerr << "Error while inspecting files in package" - << package.extracted_package_dir_path << std::endl; + << package.extracted_package_dir_path << "\n"; return false; } @@ -367,7 +366,7 @@ compare(package& first_package, package& second_package) cout << "Removed binaries\n"; for (vector::iterator it = abi_diffs.removed_binaries.begin(); it != abi_diffs.removed_binaries.end(); ++it) - cout << *it << std::endl; + cout << *it << "\n"; } if (abi_diffs.added_binaries.size()) @@ -375,7 +374,7 @@ compare(package& first_package, package& second_package) cout << "Added binaries\n"; for (vector::iterator it = abi_diffs.added_binaries.begin(); it != abi_diffs.added_binaries.end(); ++it) - cout << *it << std::endl; + cout << *it << "\n"; } erase_created_temporary_directories(first_package, second_package); @@ -465,7 +464,7 @@ main(int argc, char* argv[]) if (opts.package1.empty() || opts.package2.empty()) { - cerr << "Please enter two packages to compare" << endl; + cerr << "Please enter two packages to compare" << "\n"; return 1; }