Skip to content

Commit

Permalink
Merge pull request #183 from hclee/wangfangli-fixes
Browse files Browse the repository at this point in the history
Wangfangli fixes
  • Loading branch information
namjaejeon authored Nov 11, 2021
2 parents 0ddd7be + 6ebabb7 commit 0db6698
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fsck/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,11 @@ static char *bytes_to_human_readable(size_t bytes)
shift += 10;
}

if (i >= sizeof(units)/sizeof(units[0])) {
i = i - 1;
shift = shift - 10;
}

quoti = (unsigned int)(bytes / (1ULL << shift));
remain = 0;
if (shift > 0) {
Expand Down Expand Up @@ -1596,8 +1601,10 @@ int main(int argc, char * const argv[])
goto err;

ret = init_exfat(exfat, bs);
if (ret)
if (ret) {
exfat = NULL;
goto err;
}

if (exfat_mark_volume_dirty(exfat, true)) {
ret = -EIO;
Expand Down

0 comments on commit 0db6698

Please sign in to comment.