diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-02-04 17:26:53 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2023-02-18 15:18:53 +0100 |
commit | 7c68f01ddd9a118709717d990827c90fbf768447 (patch) | |
tree | edcd9bc9a0bba14293700da8042496667987d24a /linux/Platform.c | |
parent | 37eddcf5cd5129040532d5f9b965006226fdb0c1 (diff) |
Misc cleanup
* declare read-only pointer parameter const
* drop duplicate include of <errno.h>
* use String_startsWith
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index ad94381e..911284e9 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 <errno.h> #include <sys/capability.h> #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}; |