Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant function calls #3

Open
FrankHB opened this issue Jun 24, 2015 · 0 comments
Open

Redundant function calls #3

FrankHB opened this issue Jun 24, 2015 · 0 comments

Comments

@FrankHB
Copy link
Contributor

FrankHB commented Jun 24, 2015

In "source/file_allocation_table.c":

uint32_t _FAT_fat_lastCluster (PARTITION* partition, uint32_t cluster) {
    while ((_FAT_fat_nextCluster(partition, cluster) != CLUSTER_FREE) && (_FAT_fat_nextCluster(partition, cluster) != CLUSTER_EOF)) {
        cluster = _FAT_fat_nextCluster(partition, cluster);
    }
    return cluster;
}

It seems that mutiple '_FAT_fat_nextCluster' calls can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant