Remove unnecessary trailing semicolon on macros

This commit is contained in:
Benny Baumann 2020-10-31 20:08:44 +01:00
parent 0806a7958b
commit 7ab0915a6c
3 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ typedef void(*Object_Delete)(Object*);
#define Class(class_) ((const ObjectClass*)(&(class_ ## _class)))
#define AllocThis(class_) (class_*) xMalloc(sizeof(class_)); Object_setClass(this, Class(class_));
#define AllocThis(class_) (class_*) xMalloc(sizeof(class_)); Object_setClass(this, Class(class_))
typedef struct ObjectClass_ {
const void* const extends;

View File

@ -15,9 +15,9 @@ in the source distribution for its full text.
#define RichString_size(this) ((this)->chlen)
#define RichString_sizeVal(this) ((this).chlen)
#define RichString_begin(this) RichString (this); RichString_beginAllocated(this);
#define RichString_beginAllocated(this) memset(&(this), 0, sizeof(RichString)); (this).chptr = (this).chstr;
#define RichString_end(this) RichString_prune(&(this));
#define RichString_begin(this) RichString (this); RichString_beginAllocated(this)
#define RichString_beginAllocated(this) memset(&(this), 0, sizeof(RichString)); (this).chptr = (this).chstr
#define RichString_end(this) RichString_prune(&(this))
#ifdef HAVE_LIBNCURSESW
#define RichString_printVal(this, y, x) mvadd_wchstr(y, x, (this).chptr)

View File

@ -778,8 +778,8 @@ static int handleNetlinkMsg(struct nl_msg *nlmsg, void *linuxProcess) {
assert(lp->super.pid == (pid_t)stats.ac_pid);
timeDelta = (stats.ac_etime*1000 - lp->delay_read_time);
#define BOUNDS(x) isnan(x) ? 0.0 : ((x) > 100) ? 100.0 : (x);
#define DELTAPERC(x,y) BOUNDS((float) ((x) - (y)) / timeDelta * 100);
#define BOUNDS(x) isnan(x) ? 0.0 : ((x) > 100) ? 100.0 : (x)
#define DELTAPERC(x,y) BOUNDS((float) ((x) - (y)) / timeDelta * 100)
lp->cpu_delay_percent = DELTAPERC(stats.cpu_delay_total, lp->cpu_delay_total);
lp->blkio_delay_percent = DELTAPERC(stats.blkio_delay_total, lp->blkio_delay_total);
lp->swapin_delay_percent = DELTAPERC(stats.swapin_delay_total, lp->swapin_delay_total);