[hackers] [st] misplaced parenthesis in LEN macro || noname_AT_inventati.org

From: <git_AT_suckless.org>
Date: Tue, 22 Apr 2014 07:36:08 +0200

commit 6b56cbf9cc597b529f244ee8fcb1cbbcc338c7b7
Author: noname_AT_inventati.org <noname_AT_inventati.org>
Date: Sun Apr 20 15:41:40 2014 +0400

    misplaced parenthesis in LEN macro

diff --git a/st.c b/st.c
index e017940..4ccef9c 100644
--- a/st.c
+++ b/st.c
_AT_@ -67,7 +67,7 @@ char *argv0;
 /* macros */
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 #define MAX(a, b) ((a) < (b) ? (b) : (a))
-#define LEN(a) (sizeof(a) / sizeof(a[0]))
+#define LEN(a) (sizeof(a) / sizeof(a)[0])
 #define DEFAULT(a, b) (a) = (a) ? (a) : (b)
 #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
 #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
Received on Tue Apr 22 2014 - 07:36:08 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 22 2014 - 07:48:07 CEST