mirror of https://github.com/xzeldon/htop.git
Merge identical conditional branches
This commit is contained in:
parent
43ee295c23
commit
9029cc83ad
|
@ -536,9 +536,7 @@ static void LinuxProcess_writeCommand(const Process* this, int attr, int baseAtt
|
||||||
RichString_append(str, attr, lp->mergedCommand.str);
|
RichString_append(str, attr, lp->mergedCommand.str);
|
||||||
|
|
||||||
if (lp->mergedCommand.commEnd) {
|
if (lp->mergedCommand.commEnd) {
|
||||||
if (lp->mergedCommand.separateComm) {
|
if (!lp->mergedCommand.separateComm && commStart == baseStart && highlightBaseName) {
|
||||||
RichString_setAttrn(str, commAttr, commStart, commEnd - 1);
|
|
||||||
} else if (commStart == baseStart && highlightBaseName) {
|
|
||||||
/* If it was matched with procExe's basename, make it bold if needed */
|
/* If it was matched with procExe's basename, make it bold if needed */
|
||||||
if (commEnd > baseEnd) {
|
if (commEnd > baseEnd) {
|
||||||
RichString_setAttrn(str, A_BOLD | baseAttr, baseStart, baseEnd - 1);
|
RichString_setAttrn(str, A_BOLD | baseAttr, baseStart, baseEnd - 1);
|
||||||
|
|
|
@ -1117,9 +1117,7 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc
|
||||||
command[i] = '\n';
|
command[i] = '\n';
|
||||||
}
|
}
|
||||||
} else if (!tokenEnd) {
|
} else if (!tokenEnd) {
|
||||||
if (command[i] == '/') {
|
if (command[i] == '/' || (command[i] == '\\' && (!tokenStart || command[tokenStart - 1] == '\\'))) {
|
||||||
tokenStart = i + 1;
|
|
||||||
} else if (command[i] == '\\' && (!tokenStart || command[tokenStart - 1] == '\\')) {
|
|
||||||
tokenStart = i + 1;
|
tokenStart = i + 1;
|
||||||
} else if (command[i] == ':' && (command[i + 1] != '/' && command[i + 1] != '\\')) {
|
} else if (command[i] == ':' && (command[i + 1] != '/' && command[i + 1] != '\\')) {
|
||||||
tokenEnd = i;
|
tokenEnd = i;
|
||||||
|
|
Loading…
Reference in New Issue