aboutsummaryrefslogtreecommitdiff
path: root/atf-sh/atf-check.cpp
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2021-09-10 22:50:50 +0000
committerAlan Somers <asomers@FreeBSD.org>2021-09-10 22:50:50 +0000
commitcd355e3667c67b15d9850bacb416b13486e22c24 (patch)
tree9c47797123524e0a94d800711aed08cb35a83302 /atf-sh/atf-check.cpp
parenta3330ae736606c1812b9e9c4b9dcfdfb1a150dde (diff)
Diffstat (limited to 'atf-sh/atf-check.cpp')
-rw-r--r--atf-sh/atf-check.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/atf-sh/atf-check.cpp b/atf-sh/atf-check.cpp
index c0658935086a..41f0b13d0494 100644
--- a/atf-sh/atf-check.cpp
+++ b/atf-sh/atf-check.cpp
@@ -500,7 +500,7 @@ compare_files(const atf::fs::path& p1, const atf::fs::path& p2)
std::ifstream f2(p2.c_str());
if (!f2)
- throw std::runtime_error("Failed to open " + p1.str());
+ throw std::runtime_error("Failed to open " + p2.str());
for (;;) {
char buf1[512], buf2[512];
@@ -511,7 +511,7 @@ compare_files(const atf::fs::path& p1, const atf::fs::path& p2)
f2.read(buf2, sizeof(buf2));
if (f2.bad())
- throw std::runtime_error("Failed to read from " + p1.str());
+ throw std::runtime_error("Failed to read from " + p2.str());
if ((f1.gcount() == 0) && (f2.gcount() == 0)) {
equal = true;