Skip to content

Commit

Permalink
simplify crop by using the function for advancing a cluster reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerwk committed Mar 10, 2018
1 parent c8fe78c commit 28c2101
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tools/fattool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,13 +1484,8 @@ int main(int argn, char *argv[]) {

for (cl = target;
cl >= FAT_FIRST && size > 0;
cl = fatreferencegettarget(f,
directory, index, previous)) {
cl = fatreferencenext(f, &directory, &index, &previous))
size -= fatbytespercluster(f);
directory = NULL;
index = 0;
previous = cl;
}
fatreferencesettarget(f, directory, index, previous, FAT_EOF);
if (chain)
fatclusterfreechain(f, cl);
Expand Down

0 comments on commit 28c2101

Please sign in to comment.