diff options
author | Nathan Scott <nathans@redhat.com> | 2020-08-20 14:19:53 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2020-08-20 14:19:53 +1000 |
commit | a82fd262d75f8494c34416e49c6241c29692676e (patch) | |
tree | 5c4ff9b8a872ca06e8e200a034099c736da1e160 /Process.c | |
parent | cdff8aea2ab10870af1aad5bdb6949ea0fd407b0 (diff) | |
parent | 63fbc3b51704b4b122d2cab57de7e7f9dfcc03b1 (diff) |
Merge branch 'hishamhm-pull-960'
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -220,7 +220,7 @@ void Process_setupColumnWidths() { void Process_humanNumber(RichString* str, unsigned long number, bool coloring) { char buffer[11]; int len; - + int largeNumberColor = CRT_colors[LARGE_NUMBER]; int processMegabytesColor = CRT_colors[PROCESS_MEGABYTES]; int processColor = CRT_colors[PROCESS]; @@ -228,7 +228,7 @@ void Process_humanNumber(RichString* str, unsigned long number, bool coloring) { largeNumberColor = CRT_colors[PROCESS]; processMegabytesColor = CRT_colors[PROCESS]; } - + if(number >= (10 * ONE_DECIMAL_M)) { #ifdef __LP64__ if(number >= (100 * ONE_DECIMAL_G)) { @@ -394,9 +394,9 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) { switch (field) { case PERCENT_CPU: { if (this->percent_cpu > 999.9) { - xSnprintf(buffer, n, "%4u ", (unsigned int)this->percent_cpu); + xSnprintf(buffer, n, "%4u ", (unsigned int)this->percent_cpu); } else if (this->percent_cpu > 99.9) { - xSnprintf(buffer, n, "%3u. ", (unsigned int)this->percent_cpu); + xSnprintf(buffer, n, "%3u. ", (unsigned int)this->percent_cpu); } else { xSnprintf(buffer, n, "%4.1f ", this->percent_cpu); } @@ -404,7 +404,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) { } case PERCENT_MEM: { if (this->percent_mem > 99.9) { - xSnprintf(buffer, n, "100. "); + xSnprintf(buffer, n, "100. "); } else { xSnprintf(buffer, n, "%4.1f ", this->percent_mem); } |