Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
bf456972
Commit
bf456972
authored
Aug 28, 2015
by
Christian Hesse
Browse files
kilobytes is the smallest unit and never has precision
Signed-off-by:
Christian Hesse
<
mail@eworm.de
>
parent
a859e920
Changes
1
Show whitespace changes
Inline
Side-by-side
Meter.c
View file @
bf456972
...
@@ -157,6 +157,9 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
...
@@ -157,6 +157,9 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
++
prefix
;
++
prefix
;
}
}
if
(
*
prefix
==
'K'
)
precision
=
0
;
for
(;
precision
>
0
;
precision
--
)
{
for
(;
precision
>
0
;
precision
--
)
{
powj
*=
10
;
powj
*=
10
;
if
(
value
/
powi
<
powj
)
if
(
value
/
powi
<
powj
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment