From 7c68f01ddd9a118709717d990827c90fbf768447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 4 Feb 2023 17:26:53 +0100 Subject: [PATCH] Misc cleanup * declare read-only pointer parameter const * drop duplicate include of * use String_startsWith --- ScreenManager.c | 2 +- linux/Platform.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ScreenManager.c b/ScreenManager.c index 55cacd20a..87e718926 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -153,7 +153,7 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi *rescan = false; } -static inline bool drawTab(int* y, int* x, int l, const char* name, bool cur) { +static inline bool drawTab(const int* y, int* x, int l, const char* name, bool cur) { attrset(CRT_colors[cur ? SCREENS_CUR_BORDER : SCREENS_OTH_BORDER]); mvaddch(*y, *x, '['); (*x)++; diff --git a/linux/Platform.c b/linux/Platform.c index ad94381e6..911284e9b 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -64,7 +64,6 @@ in the source distribution for its full text. #include "zfs/ZfsCompressedArcMeter.h" #ifdef HAVE_LIBCAP -#include #include #endif @@ -476,7 +475,7 @@ FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { if (!strchr(buffer, '\n')) continue; - if (strncmp(buffer, "lock:\t", strlen("lock:\t"))) + if (!String_startsWith(buffer, "lock:\t")) continue; FileLocks_Data data = {.fd = file};