summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/shell.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 41d99b4..275293a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 	* Update funcnest atomically.
 	* Only set skipcount for break and continue.
 	* Removed expcmd built-in.
+	* Normalise input in likely/unlikely macros.
 
 2005-02-28  A Costa <agcosta@gis.net>
 
diff --git a/src/shell.h b/src/shell.h
index 01c54d7..7034e29 100644
--- a/src/shell.h
+++ b/src/shell.h
@@ -96,5 +96,5 @@ extern char nullstr[1];		/* null string */
 #define __builtin_expect(x, expected_value) (x)
 #endif
 
-#define likely(x)	__builtin_expect((x),1)
-#define unlikely(x)	__builtin_expect((x),0)
+#define likely(x)	__builtin_expect(!!(x),1)
+#define unlikely(x)	__builtin_expect(!!(x),0)