Skip to content

Commit

Permalink
update unitconv
Browse files Browse the repository at this point in the history
  • Loading branch information
uidops committed Mar 19, 2024
1 parent 81ddd2a commit 8dba1d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sucktus.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,13 +718,13 @@ unitconv(char *retmsg, size_t len, uint64_t bps)
else if (ndigits - 6 < 0)
snprintf(retmsg, len, "%.1f KB/s | ", bps/1E3);
else if (ndigits - 9 < 0)
snprintf(retmsg, len, "%1.f MB/s | ", bps/1E6);
snprintf(retmsg, len, "%.1f MB/s | ", bps/1E6);
else if (ndigits - 9 < 0)
snprintf(retmsg, len, "%1.f GB/s | ", bps/1E9);
snprintf(retmsg, len, "%.1f GB/s | ", bps/1E9);
else if (ndigits - 9 < 0)
snprintf(retmsg, len, "%1.f TB/s | ", bps/1E12);
snprintf(retmsg, len, "%.1f TB/s | ", bps/1E12);
else
snprintf(retmsg, len, "%1.f PB/s | ", bps/1E15);
snprintf(retmsg, len, "%.1f PB/s | ", bps/1E15);

return retmsg;
}

0 comments on commit 8dba1d4

Please sign in to comment.