summaryrefslogtreecommitdiffstats
path: root/Header.c
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2016-05-07 14:57:51 +0800
committerExplorer09 <explorer09@gmail.com>2016-05-07 14:57:51 +0800
commit54621e8b8fd804f06bf5f007dcb52b469521296c (patch)
tree57054e5e6ad9059e79370bc3eebdca672d717e58 /Header.c
parent572546f8063095ff3195ef10823ec1f4882092f3 (diff)
Fix macro Header_forEachColumn
The (this_) token was not expanded properly, but the bug was not caught because all uses of this macro specifies (this_)=this . Also parenthesize macro tokens to prevent further problems.
Diffstat (limited to 'Header.c')
-rw-r--r--Header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Header.c b/Header.c
index 929a6e0e..07631058 100644
--- a/Header.c
+++ b/Header.c
@@ -37,7 +37,7 @@ typedef struct Header_ {
#endif
#ifndef Header_forEachColumn
-#define Header_forEachColumn(this_, i_) for (int i_=0; i_ < this->nrColumns; i_++)
+#define Header_forEachColumn(this_, i_) for (int (i_)=0; (i_) < (this_)->nrColumns; ++(i_))
#endif
Header* Header_new(struct ProcessList_* pl, Settings* settings, int nrColumns) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy