Skip to content

Commit c0c9a0b

Browse files
committed
Simplify an expression in Process_updateExe()
Signed-off-by: Kang-Che Sung <[email protected]>
1 parent 3ede966 commit c0c9a0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Process.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ void Process_updateExe(Process* this, const char* exe) {
10811081
if (exe) {
10821082
this->procExe = xStrdup(exe);
10831083
const char* lastSlash = strrchr(exe, '/');
1084-
this->procExeBasenameOffset = (lastSlash && *(lastSlash + 1) != '\0' && lastSlash != exe) ? (size_t)(lastSlash - exe + 1) : 0;
1084+
this->procExeBasenameOffset = (lastSlash > exe && *(lastSlash + 1) != '\0') ? (size_t)(lastSlash - exe + 1) : 0;
10851085
} else {
10861086
this->procExe = NULL;
10871087
this->procExeBasenameOffset = 0;

0 commit comments

Comments
 (0)