summary refs log tree commit diff
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2005-03-02 19:59:26 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:04 +1000
commit745ddce75aa4860b9d82dcc5b06297df33f06583 (patch)
tree42706d89c6e0e4ac05b06e7d5066ef0705ed248a
parentRenamed error to sh_error. (diff)
downloaddash-745ddce75aa4860b9d82dcc5b06297df33f06583.tar.gz
dash-745ddce75aa4860b9d82dcc5b06297df33f06583.zip
Enclose abort insode ifdef DEBUG.
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/bltin/test.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d04bbde..62b37b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2005-03-02  Herbert Xu <herbert@gondor.apana.org.au>
 
 	* Renamed symbols to avoid conflict with libc.
+	* Enclose abort inside ifdef DEBUG.
 
 2005-02-28  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/bltin/test.c b/src/bltin/test.c
index 1bcba4e..6a2e02c 100644
--- a/src/bltin/test.c
+++ b/src/bltin/test.c
@@ -304,6 +304,11 @@ binop(void)
 		syntax(op->op_text, "argument expected");
 		
 	switch (op->op_num) {
+	default:
+#ifdef DEBUG
+		abort();
+		/* NOTREACHED */
+#endif
 	case STREQ:
 		return strcmp(opnd1, opnd2) == 0;
 	case STRNE:
@@ -330,9 +335,6 @@ binop(void)
 		return olderf (opnd1, opnd2);
 	case FILEQ:
 		return equalf (opnd1, opnd2);
-	default:
-		abort();
-		/* NOTREACHED */
 	}
 }