diff --git a/ListItem.c b/ListItem.c index 4f138e5e..e5464d27 100644 --- a/ListItem.c +++ b/ListItem.c @@ -31,9 +31,9 @@ static void ListItem_display(const Object* cast, RichString* out) { if (this->moving) { RichString_writeWide(out, CRT_colors[DEFAULT_COLOR], #ifdef HAVE_LIBNCURSESW - CRT_utf8 ? "↕ " : + CRT_utf8 ? "↕ " : #endif - "+ "); + "+ "); } RichString_appendWide(out, CRT_colors[DEFAULT_COLOR], this->value); } diff --git a/Process.c b/Process.c index b93759bf..8ecb6347 100644 --- a/Process.c +++ b/Process.c @@ -405,13 +405,13 @@ void Process_makeCommandStr(Process *this) { /* this->mergedCommand.str needs updating only if its state or contents changed. * Its content is based on the fields cmdline, comm, and exe. */ if ( - mc->prevMergeSet == showMergedCommand && - mc->prevPathSet == showProgramPath && - mc->prevCommSet == searchCommInCmdline && - mc->prevCmdlineSet == stripExeFromCmdline && - !mc->cmdlineChanged && - !mc->commChanged && - !mc->exeChanged + mc->prevMergeSet == showMergedCommand && + mc->prevPathSet == showProgramPath && + mc->prevCommSet == searchCommInCmdline && + mc->prevCmdlineSet == stripExeFromCmdline && + !mc->cmdlineChanged && + !mc->commChanged && + !mc->exeChanged ) { return; } @@ -992,7 +992,7 @@ bool Process_isNew(const Process* this) { } bool Process_isTomb(const Process* this) { - return this->tombStampMs > 0; + return this->tombStampMs > 0; } bool Process_setPriority(Process* this, int priority) { diff --git a/Vector.h b/Vector.h index dab94693..5347ad78 100644 --- a/Vector.h +++ b/Vector.h @@ -69,7 +69,7 @@ static inline int Vector_size(const Vector* this) { #endif /* NDEBUG */ static inline const ObjectClass* Vector_type(const Vector* this) { - return this->type; + return this->type; } void Vector_add(Vector* this, void* data_); diff --git a/darwin/Platform.c b/darwin/Platform.c index a983df9b..3fcf314d 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -324,14 +324,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/darwin/Platform.h b/darwin/Platform.h index 8fe8a2ce..9b9f9b72 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -87,7 +87,7 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } void Platform_gettime_monotonic(uint64_t* msec); diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index 8a3a61b0..39983f08 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -219,14 +219,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h index 73b1c08b..346e299b 100644 --- a/dragonflybsd/Platform.h +++ b/dragonflybsd/Platform.h @@ -82,11 +82,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) { diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 60afe074..1478e7b7 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -558,9 +558,9 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->percent_mem = 100.0 * proc->m_resident / (double)(super->totalMem); if (kproc->ki_stat == SRUN && kproc->ki_oncpu != NOCPU) { - proc->processor = kproc->ki_oncpu; + proc->processor = kproc->ki_oncpu; } else { - proc->processor = kproc->ki_lastcpu; + proc->processor = kproc->ki_lastcpu; } proc->majflt = kproc->ki_cow; diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 61a6ae37..73383b28 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -267,14 +267,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 2edf34f5..8c962929 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -82,11 +82,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) { diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 6f86d021..ed189423 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -455,8 +455,8 @@ static void LinuxProcessList_readIoFile(LinuxProcess* process, openat_arg_t proc } typedef struct LibraryData_ { - uint64_t size; - bool exec; + uint64_t size; + bool exec; } LibraryData; static inline uint64_t fast_strtoull_dec(char **str, int maxlen) { @@ -975,10 +975,10 @@ static void LinuxProcessList_readDelayAcctData(LinuxProcessList* this, LinuxProc struct nl_msg* msg; if (!this->netlink_socket) { - LinuxProcessList_initNetlinkSocket(this); - if (!this->netlink_socket) { - goto delayacct_failure; - } + LinuxProcessList_initNetlinkSocket(this); + if (!this->netlink_socket) { + goto delayacct_failure; + } } if (nl_socket_modify_cb(this->netlink_socket, NL_CB_VALID, NL_CB_CUSTOM, handleNetlinkMsg, process) < 0) { diff --git a/linux/Platform.h b/linux/Platform.h index a1612e29..794d7921 100644 --- a/linux/Platform.h +++ b/linux/Platform.h @@ -98,11 +98,11 @@ void Platform_longOptionsUsage(const char* name); bool Platform_getLongOption(int opt, int argc, char** argv); static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) { diff --git a/netbsd/Platform.c b/netbsd/Platform.c index 1b1a093b..c653d1bf 100644 --- a/netbsd/Platform.c +++ b/netbsd/Platform.c @@ -299,14 +299,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/netbsd/Platform.h b/netbsd/Platform.h index dcac4430..e9ec2f08 100644 --- a/netbsd/Platform.h +++ b/netbsd/Platform.h @@ -87,11 +87,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) { diff --git a/openbsd/Platform.c b/openbsd/Platform.c index 00e5008a..1afbdfde 100644 --- a/openbsd/Platform.c +++ b/openbsd/Platform.c @@ -272,14 +272,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/openbsd/Platform.h b/openbsd/Platform.h index 01574adb..fb3b909b 100644 --- a/openbsd/Platform.h +++ b/openbsd/Platform.h @@ -80,11 +80,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) { diff --git a/pcp/PCPDynamicMeter.c b/pcp/PCPDynamicMeter.c index 3d29d554..a6c2ab26 100644 --- a/pcp/PCPDynamicMeter.c +++ b/pcp/PCPDynamicMeter.c @@ -78,23 +78,23 @@ static void PCPDynamicMeter_parseMetric(PCPDynamicMeters* meters, PCPDynamicMete metric = PCPDynamicMeter_lookupMetric(meters, meter, key); if (String_eq(p, "color")) { if (String_eq(value, "gray")) - metric->color = DYNAMIC_GRAY; + metric->color = DYNAMIC_GRAY; else if (String_eq(value, "darkgray")) - metric->color = DYNAMIC_DARKGRAY; + metric->color = DYNAMIC_DARKGRAY; else if (String_eq(value, "red")) - metric->color = DYNAMIC_RED; + metric->color = DYNAMIC_RED; else if (String_eq(value, "green")) - metric->color = DYNAMIC_GREEN; + metric->color = DYNAMIC_GREEN; else if (String_eq(value, "blue")) - metric->color = DYNAMIC_BLUE; + metric->color = DYNAMIC_BLUE; else if (String_eq(value, "cyan")) - metric->color = DYNAMIC_CYAN; + metric->color = DYNAMIC_CYAN; else if (String_eq(value, "magenta")) - metric->color = DYNAMIC_MAGENTA; + metric->color = DYNAMIC_MAGENTA; else if (String_eq(value, "yellow")) - metric->color = DYNAMIC_YELLOW; + metric->color = DYNAMIC_YELLOW; else if (String_eq(value, "white")) - metric->color = DYNAMIC_WHITE; + metric->color = DYNAMIC_WHITE; } else if (String_eq(p, "label")) { char* label = String_cat(value, ": "); free_and_xStrdup(&metric->label, label); @@ -204,13 +204,13 @@ static void PCPDynamicMeter_parseFile(PCPDynamicMeters* meters, const char* path free_and_xStrdup(&meter->super.description, value); } else if (value && meter && String_eq(key, "type")) { if (String_eq(config[1], "bar")) - meter->super.type = BAR_METERMODE; + meter->super.type = BAR_METERMODE; else if (String_eq(config[1], "text")) - meter->super.type = TEXT_METERMODE; + meter->super.type = TEXT_METERMODE; else if (String_eq(config[1], "graph")) - meter->super.type = GRAPH_METERMODE; + meter->super.type = GRAPH_METERMODE; else if (String_eq(config[1], "led")) - meter->super.type = LED_METERMODE; + meter->super.type = LED_METERMODE; } else if (value && meter && String_eq(key, "maximum")) { meter->super.maximum = strtod(value, NULL); } else if (value && meter) { diff --git a/pcp/PCPProcessList.c b/pcp/PCPProcessList.c index bd4e782b..ac72e434 100644 --- a/pcp/PCPProcessList.c +++ b/pcp/PCPProcessList.c @@ -460,7 +460,7 @@ static void PCPProcessList_updateMemoryInfo(ProcessList* super) { super->totalSwap = value.ull; if (Metric_values(PCP_MEM_SWAPCACHED, &value, 1, PM_TYPE_U64) != NULL) super->cachedSwap = value.ull; - super->usedSwap = super->totalSwap - swapFreeMem - super->cachedSwap; + super->usedSwap = super->totalSwap - swapFreeMem - super->cachedSwap; } /* make copies of previously sampled values to avoid overwrite */ diff --git a/pcp/Platform.c b/pcp/Platform.c index 6512ed66..082f4b5b 100644 --- a/pcp/Platform.c +++ b/pcp/Platform.c @@ -670,15 +670,15 @@ void Platform_setZramValues(Meter* this) { if (Metric_values(PCP_ZRAM_CAPACITY, values, count, PM_TYPE_U64)) { for (i = 0; i < count; i++) - stats.totalZram += values[i].ull; + stats.totalZram += values[i].ull; } if (Metric_values(PCP_ZRAM_ORIGINAL, values, count, PM_TYPE_U64)) { for (i = 0; i < count; i++) - stats.usedZramOrig += values[i].ull; + stats.usedZramOrig += values[i].ull; } if (Metric_values(PCP_ZRAM_COMPRESSED, values, count, PM_TYPE_U64)) { for (i = 0; i < count; i++) - stats.usedZramComp += values[i].ull; + stats.usedZramComp += values[i].ull; } free(values); @@ -701,8 +701,8 @@ void Platform_setZfsCompressedArcValues(Meter* this) { } void Platform_getHostname(char* buffer, size_t size) { - const char* hostname = pmGetContextHostName(pcp->context); - String_safeStrncpy(buffer, hostname, size); + const char* hostname = pmGetContextHostName(pcp->context); + String_safeStrncpy(buffer, hostname, size); } void Platform_getRelease(char** string) { diff --git a/solaris/Platform.c b/solaris/Platform.c index c2ef2773..da39a33d 100644 --- a/solaris/Platform.c +++ b/solaris/Platform.c @@ -287,14 +287,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { diff --git a/solaris/Platform.h b/solaris/Platform.h index db36e395..90108776 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -109,11 +109,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline void* kstat_data_lookup_wrapper(kstat_t* ksp, const char* name) { diff --git a/unsupported/Platform.c b/unsupported/Platform.c index fb97fad5..d8da9453 100644 --- a/unsupported/Platform.c +++ b/unsupported/Platform.c @@ -124,14 +124,14 @@ char* Platform_getProcessEnv(pid_t pid) { } char* Platform_getInodeFilename(pid_t pid, ino_t inode) { - (void)pid; - (void)inode; - return NULL; + (void)pid; + (void)inode; + return NULL; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { - (void)pid; - return NULL; + (void)pid; + return NULL; } bool Platform_getDiskIO(DiskIOData* data) { @@ -154,5 +154,5 @@ void Platform_getHostname(char* buffer, size_t size) { } void Platform_getRelease(char** string) { - *string = xStrdup(Platform_unsupported); + *string = xStrdup(Platform_unsupported); } diff --git a/unsupported/Platform.h b/unsupported/Platform.h index c2d2f60d..af66bf99 100644 --- a/unsupported/Platform.h +++ b/unsupported/Platform.h @@ -71,11 +71,11 @@ static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int a } static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) { - Generic_gettime_realtime(tv, msec); + Generic_gettime_realtime(tv, msec); } static inline void Platform_gettime_monotonic(uint64_t* msec) { - Generic_gettime_monotonic(msec); + Generic_gettime_monotonic(msec); } static inline Hashtable* Platform_dynamicMeters(void) {