Skip to content

Commit

Permalink
Simplify an expression in Process_updateExe()
Browse files Browse the repository at this point in the history
Signed-off-by: Kang-Che Sung <[email protected]>
  • Loading branch information
Explorer09 committed Jan 16, 2025
1 parent 3ede966 commit c0c9a0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c0c9a0b

Please sign in to comment.