summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2016-05-07 14:34:50 -0300
committerHisham Muhammad <hisham@gobolinux.org>2016-05-07 14:34:50 -0300
commit7d72715a6bb556882f8f9afbf9d9d8fb03350c1d (patch)
tree57054e5e6ad9059e79370bc3eebdca672d717e58
parent572546f8063095ff3195ef10823ec1f4882092f3 (diff)
parent54621e8b8fd804f06bf5f007dcb52b469521296c (diff)
Merge pull request #490 from Explorer09/macro-fixes
Fix macro Header_forEachColumn
-rw-r--r--Header.c2
-rw-r--r--Header.h2
2 files changed, 2 insertions, 2 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) {
diff --git a/Header.h b/Header.h
index 772e25dd..700ad354 100644
--- a/Header.h
+++ b/Header.h
@@ -28,7 +28,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);