From e7f8d7bcc954e965143331ec3f2353c03959acc6 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Wed, 14 Jul 2021 19:11:18 +0200 Subject: [PATCH] Split statements that should go onto multiple lines --- Action.c | 6 ++++-- AvailableMetersPanel.c | 3 ++- CommandLine.c | 3 ++- darwin/Platform.h | 4 +++- dragonflybsd/Platform.h | 4 +++- freebsd/Platform.h | 4 +++- linux/LinuxProcess.c | 3 ++- linux/Platform.h | 4 +++- netbsd/Platform.h | 4 +++- openbsd/Platform.h | 4 +++- pcp/PCPProcess.c | 3 ++- solaris/Platform.h | 4 +++- unsupported/Platform.h | 4 +++- 13 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Action.c b/Action.c index d6fd7371..2a580f74 100644 --- a/Action.c +++ b/Action.c @@ -227,7 +227,8 @@ static Htop_Reaction actionToggleMergedCommand(State* st) { static Htop_Reaction actionToggleTreeView(State* st) { st->settings->treeView = !st->settings->treeView; - if (!st->settings->allBranchesCollapsed) ProcessList_expandTree(st->pl); + if (!st->settings->allBranchesCollapsed) + ProcessList_expandTree(st->pl); return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR; } @@ -399,7 +400,8 @@ static Htop_Reaction actionLsof(State* st) { static Htop_Reaction actionShowLocks(State* st) { const Process* p = (Process*) Panel_getSelected((Panel*)st->mainPanel); - if (!p) return HTOP_OK; + if (!p) + return HTOP_OK; ProcessLocksScreen* pls = ProcessLocksScreen_new(p); InfoScreen_run((InfoScreen*)pls); ProcessLocksScreen_delete((Object*)pls); diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c index 048c7175..5a522a5d 100644 --- a/AvailableMetersPanel.c +++ b/AvailableMetersPanel.c @@ -117,7 +117,8 @@ static void AvailableMetersPanel_addDynamicMeter(ATTR_UNUSED ht_key_t key, void* DynamicIterator* iter = (DynamicIterator*)data; unsigned int identifier = (iter->offset << 16) | iter->id; const char* label = meter->description ? meter->description : meter->caption; - if (!label) label = meter->name; /* last fallback to name, guaranteed set */ + if (!label) + label = meter->name; /* last fallback to name, guaranteed set */ Panel_add(iter->super, (Object*) ListItem_new(label, identifier)); iter->id++; } diff --git a/CommandLine.c b/CommandLine.c index 4a721a3d..d0c24e58 100644 --- a/CommandLine.c +++ b/CommandLine.c @@ -124,7 +124,8 @@ static CommandLineSettings parseArguments(const char* program, int argc, char** int opt, opti=0; /* Parse arguments */ while ((opt = getopt_long(argc, argv, "hVMCs:td:u::Up:F:H::", long_opts, &opti))) { - if (opt == EOF) break; + if (opt == EOF) + break; switch (opt) { case 'h': printHelpFlag(program); diff --git a/darwin/Platform.h b/darwin/Platform.h index c0743f1c..8fe8a2ce 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -92,7 +92,9 @@ static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) void Platform_gettime_monotonic(uint64_t* msec); -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h index 04c54555..73b1c08b 100644 --- a/dragonflybsd/Platform.h +++ b/dragonflybsd/Platform.h @@ -89,7 +89,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 09adfc18..2edf34f5 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -89,7 +89,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index bd7a7300..fe8492df 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -217,7 +217,8 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces totalRate = lp->io_rate_write_bps; else totalRate = NAN; - Process_printRate(str, totalRate, coloring); return; + Process_printRate(str, totalRate, coloring); + return; } #ifdef HAVE_OPENVZ case CTID: xSnprintf(buffer, n, "%-8s ", lp->ctid ? lp->ctid : ""); break; diff --git a/linux/Platform.h b/linux/Platform.h index d44daa08..a1612e29 100644 --- a/linux/Platform.h +++ b/linux/Platform.h @@ -105,7 +105,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/netbsd/Platform.h b/netbsd/Platform.h index cfde17f1..dcac4430 100644 --- a/netbsd/Platform.h +++ b/netbsd/Platform.h @@ -94,7 +94,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/openbsd/Platform.h b/openbsd/Platform.h index 1c5e01c9..01574adb 100644 --- a/openbsd/Platform.h +++ b/openbsd/Platform.h @@ -87,7 +87,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/pcp/PCPProcess.c b/pcp/PCPProcess.c index 0802de07..993a746f 100644 --- a/pcp/PCPProcess.c +++ b/pcp/PCPProcess.c @@ -147,7 +147,8 @@ static void PCPProcess_writeField(const Process* this, RichString* str, ProcessF totalRate = pp->io_rate_write_bps; else totalRate = NAN; - Process_printRate(str, totalRate, coloring); return; + Process_printRate(str, totalRate, coloring); + return; } case CGROUP: xSnprintf(buffer, n, "%-10s ", pp->cgroup ? pp->cgroup : ""); break; case OOM: xSnprintf(buffer, n, "%4u ", pp->oom); break; diff --git a/solaris/Platform.h b/solaris/Platform.h index b32d60af..db36e395 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -128,7 +128,9 @@ IGNORE_WCASTQUAL_BEGIN IGNORE_WCASTQUAL_END } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { } diff --git a/unsupported/Platform.h b/unsupported/Platform.h index f628230f..c2d2f60d 100644 --- a/unsupported/Platform.h +++ b/unsupported/Platform.h @@ -78,7 +78,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) { Generic_gettime_monotonic(msec); } -static inline Hashtable* Platform_dynamicMeters(void) { return NULL; } +static inline Hashtable* Platform_dynamicMeters(void) { + return NULL; +} static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }