From c0c9a0b77b8158e3ec986dfb5a5fbaa75cbb36c8 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Thu, 16 Jan 2025 05:17:38 +0800 Subject: [PATCH] Simplify an expression in Process_updateExe() Signed-off-by: Kang-Che Sung --- Process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Process.c b/Process.c index d6029e626..881ca4ca7 100644 --- a/Process.c +++ b/Process.c @@ -1081,7 +1081,7 @@ void Process_updateExe(Process* this, const char* exe) { if (exe) { this->procExe = xStrdup(exe); const char* lastSlash = strrchr(exe, '/'); - this->procExeBasenameOffset = (lastSlash && *(lastSlash + 1) != '\0' && lastSlash != exe) ? (size_t)(lastSlash - exe + 1) : 0; + this->procExeBasenameOffset = (lastSlash > exe && *(lastSlash + 1) != '\0') ? (size_t)(lastSlash - exe + 1) : 0; } else { this->procExe = NULL; this->procExeBasenameOffset = 0;