From e3ebc888bf8ccdc0c43abca3030ded378d8da389 Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pj@pehjota.net>
Date: Wed, 20 Aug 2014 19:57:53 -0400
Subject: tests/common.sh: Fix atexit()

---
(limited to 'tests')

diff --git a/tests/common.sh b/tests/common.sh
index f7467ee..5f8b24f 100644
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -22,8 +22,8 @@ atexit()
 {
 	local es=${?}
 
-	if [ ${?} -ne 0 ]; then
-		exit ${?}
+	if [ ${es} -ne 0 ]; then
+		exit ${es}
 	else
 		exit ${tests_es}
 	fi
--
cgit v0.9.1