 libfiu/Makefile                   |  2 +-
 libfiu/fiu.c                      |  8 +++++---
 libfiu/libfiu.3                   |  2 +-
 preload/posix/generate            |  2 +-
 preload/run/run.c                 |  2 +-
 tests/test-enable_stack.c         | 19 ++++++++-----------
 tests/test-enable_stack_by_name.c | 19 ++++++++-----------
 tests/utils/Makefile              |  4 ++--
 8 files changed, 27 insertions(+), 31 deletions(-)

diff --git a/libfiu/Makefile b/libfiu/Makefile
index 4743513..050f20b 100644
--- a/libfiu/Makefile
+++ b/libfiu/Makefile
@@ -38,7 +38,7 @@ else
 	NICE_CC = $(CC)
 endif
 
-LIB_VER=0.95
+LIB_VER=0.96
 LIB_SO_VER=0
 
 
diff --git a/libfiu/fiu.c b/libfiu/fiu.c
index fd71815..4f9de64 100644
--- a/libfiu/fiu.c
+++ b/libfiu/fiu.c
@@ -430,14 +430,16 @@ int fiu_enable_stack(const char *name, int failnum, void *failinfo,
 	if (backtrace_works((void (*)()) fiu_enable_stack) == 0)
 		return -1;
 
+	// We need either get_func_end() or get_func_start() to work, see
+	// pc_in_func() above.
+	if (get_func_end(func) == NULL && get_func_start(func) == NULL)
+		return -1;
+
 	pf = pf_create(name, failnum, failinfo, flags, PF_STACK);
 	if (pf == NULL)
 		return -1;
 
 	pf->minfo.stack.func_start = func;
-
-	/* Note get_func_end(func) can return NULL and we would still be able
-	 * to make it work, see pc_in_func() above. */
 	pf->minfo.stack.func_end = get_func_end(func);
 	pf->minfo.stack.func_pos_in_stack = func_pos_in_stack;
 	return insert_pf(pf);
diff --git a/libfiu/libfiu.3 b/libfiu/libfiu.3
index ac9b406..e377c14 100644
--- a/libfiu/libfiu.3
+++ b/libfiu/libfiu.3
@@ -1,7 +1,7 @@
 .TH libfiu 3 "17/Feb/2009"
 .SH NAME
 libfiu - Fault injection in userspace
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B /* Core API */
 .B #include <fiu.h>
diff --git a/preload/posix/generate b/preload/posix/generate
index 6e93247..3c862f3 100755
--- a/preload/posix/generate
+++ b/preload/posix/generate
@@ -152,7 +152,7 @@ class Function:
 			n.append(self.fiu_name + '/reduce')
 		return n
 
-        def apply_variant(self, v):
+	def apply_variant(self, v):
 		if v != 'off64_t':
 			raise SyntaxError, "Unknown function variant: " + v
 
diff --git a/preload/run/run.c b/preload/run/run.c
index 74ca75b..bce0739 100644
--- a/preload/run/run.c
+++ b/preload/run/run.c
@@ -23,7 +23,7 @@ static void __attribute__((constructor)) fiu_run_init(void)
 	}
 
 	fiu_enable_env = getenv("FIU_ENABLE");
-	if (fiu_enable_env && fiu_enable_env != '\0') {
+	if (fiu_enable_env && *fiu_enable_env != '\0') {
 		/* FIU_ENABLE can contain more than one command, separated by
 		 * a newline, so we split them and call fiu_rc_string()
 		 * accordingly. */
diff --git a/tests/test-enable_stack.c b/tests/test-enable_stack.c
index e3e94f5..a5d2c54 100644
--- a/tests/test-enable_stack.c
+++ b/tests/test-enable_stack.c
@@ -6,10 +6,8 @@
 #include <fiu.h>
 #include <fiu-control.h>
 
-void func1(int should_fail)
+int func1()
 {
-	int failed;
-
 	/*
 	int nptrs;
 	void *buffer[100];
@@ -17,13 +15,12 @@ void func1(int should_fail)
 	backtrace_symbols_fd(buffer, nptrs, 1);
 	*/
 
-	failed = fiu_fail("fp-1") != 0;
-	assert(failed == should_fail);
+	return fiu_fail("fp-1") != 0;
 }
 
-void func2(int should_fail)
+int func2()
 {
-	func1(should_fail);
+	return func1();
 }
 
 
@@ -38,13 +35,13 @@ int main(void)
 		return 0;
 	}
 
-	func1(0);
-	func2(1);
+	assert(func1() == 0);
+	assert(func2() == 1);
 
 	fiu_disable("fp-1");
 
-	func1(0);
-	func2(0);
+	assert(func1() == 0);
+	assert(func2() == 0);
 
 	return 0;
 }
diff --git a/tests/test-enable_stack_by_name.c b/tests/test-enable_stack_by_name.c
index 0968aba..d769728 100644
--- a/tests/test-enable_stack_by_name.c
+++ b/tests/test-enable_stack_by_name.c
@@ -6,10 +6,8 @@
 #include <fiu.h>
 #include <fiu-control.h>
 
-void func1(int should_fail)
+int func1()
 {
-	int failed;
-
 	/*
 	int nptrs;
 	void *buffer[100];
@@ -17,13 +15,12 @@ void func1(int should_fail)
 	backtrace_symbols_fd(buffer, nptrs, 1);
 	*/
 
-	failed = fiu_fail("fp-1") != 0;
-	assert(failed == should_fail);
+	return fiu_fail("fp-1") != 0;
 }
 
-void func2(int should_fail)
+int func2()
 {
-	func1(should_fail);
+	return func1();
 }
 
 
@@ -39,13 +36,13 @@ int main(void)
 		return 0;
 	}
 
-	func1(0);
-	func2(1);
+	assert(func1() == 0);
+	assert(func2() == 1);
 
 	fiu_disable("fp-1");
 
-	func1(0);
-	func2(0);
+	assert(func1() == 0);
+	assert(func2() == 0);
 
 	return 0;
 }
diff --git a/tests/utils/Makefile b/tests/utils/Makefile
index fc78d2e..0c79bad 100644
--- a/tests/utils/Makefile
+++ b/tests/utils/Makefile
@@ -10,7 +10,7 @@ endif
 
 default: all
 
-all: lnlibs tests
+all: tests
 
 
 # Link the libraries to a single place, as the scripts expect.
@@ -34,7 +34,7 @@ SRCS := $(wildcard test-*)
 
 tests: $(patsubst %,run-%,$(SRCS))
 
-run-%: %
+run-%: % lnlibs
 	$(NICE_RUN) ./$< > output-$<.txt 2>&1
 
 
