summary refs log tree commit diff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-11 22:42:04 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-10-11 22:42:04 +0800
commitc8d4ef07a668983d8a955c7a8dc7b5bd8fa7acc7 (patch)
tree9940685c8c99ecf23a041d6b9f916d8ef43131e8
parent[ARITH] Size optimisations in arithmetic lexer (diff)
downloaddash-c8d4ef07a668983d8a955c7a8dc7b5bd8fa7acc7.tar.gz
dash-c8d4ef07a668983d8a955c7a8dc7b5bd8fa7acc7.zip
[EXPAND] Add likely flags in expari
The case where the expansion isn't quoted is the norm.
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/expand.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f26b83..98c546e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
 	* Add assignment support in arithmetic expansions.
 	* Size optimisations in arithmetic lexer.
+	* Add likely flags in expari.
 
 2007-10-08  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/expand.c b/src/expand.c
index 9cb8eab..5c31400 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -523,7 +523,7 @@ expari(int flag)
 
 	expdest = p;
 
-	if (flag & QUOTES_ESC)
+	if (likely(flag & QUOTES_ESC))
 		rmescapes(p + 1);
 
 	result = arith(p + 1);
@@ -531,7 +531,7 @@ expari(int flag)
 
 	len = cvtnum(result);
 
-	if (!(flag & EXP_QUOTED))
+	if (likely(!(flag & EXP_QUOTED)))
 		recordregion(begoff, begoff + len, 0);
 }