mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 00:29:45 +08:00
Fix unused code (coverity defect #7520283)
Due to the logic above, isz cannot be zero if we take the else branch.
This commit is contained in:
parent
56a46a0bab
commit
82b7e6de69
|
@ -1848,11 +1848,7 @@ void format_size_safe(char buff[128], unsigned long long sz) {
|
||||||
if (isz > 9) {
|
if (isz > 9) {
|
||||||
append_ull(buff, isz, &idx, max_len);
|
append_ull(buff, isz, &idx, max_len);
|
||||||
} else {
|
} else {
|
||||||
if (isz == 0) {
|
append_ull(buff, isz, &idx, max_len);
|
||||||
append_str(buff, "0", &idx, max_len);
|
|
||||||
} else {
|
|
||||||
append_ull(buff, isz, &idx, max_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maybe append a single fraction digit.
|
// Maybe append a single fraction digit.
|
||||||
unsigned long long remainder = sz % 1024;
|
unsigned long long remainder = sz % 1024;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user