mirror of https://github.com/xzeldon/htop.git
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.
This commit is contained in:
parent
572546f806
commit
54621e8b8f
2
Header.c
2
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) {
|
||||
|
|
2
Header.h
2
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);
|
||||
|
|
Loading…
Reference in New Issue