diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-10-31 20:08:44 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-11-02 22:14:26 +0100 |
commit | 7ab0915a6c8bab76273085ac563102e7ef8a6756 (patch) | |
tree | ac37435093d6728fd8a0527f51184a3328e80c2e | |
parent | 0806a7958b5b5ee29da043d3e4f3f854c164059d (diff) |
Remove unnecessary trailing semicolon on macros
-rw-r--r-- | Object.h | 2 | ||||
-rw-r--r-- | RichString.h | 6 | ||||
-rw-r--r-- | linux/LinuxProcessList.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -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; diff --git a/RichString.h b/RichString.h index aab2d891..3fb85279 100644 --- a/RichString.h +++ b/RichString.h @@ -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) diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 5e06e8c9..d40249fc 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -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); |