Browse Source

failtest: replay --failpath correctly on really failing opens.

When an open() call fails, we don't inject an error, but we didn't
apply this logic when replaying a failpath, with strange results.
Rusty Russell 14 years ago
parent
commit
adc9909e26
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/failtest/failtest.c

+ 1 - 1
ccan/failtest/failtest.c

@@ -701,7 +701,7 @@ int failtest_open(const char *pathname,
 		free((char *)call.pathname);
 	p->u.open.ret = open(pathname, call.flags, call.mode);
 
-	if (!failpath && p->u.open.ret == -1) {
+	if (p->u.open.ret == -1) {
 		p->fail = false;
 		p->error = errno;
 	} else if (should_fail(p)) {