X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Ffuse-exfat.git;a=blobdiff_plain;f=libexfat%2Fcluster.c;h=34f027cc3270a8aa214e56b496bdc3530d80f4a3;hp=13bc6ce90616b679a379c1f4e3d4ff47471a85d9;hb=d669a637798b403216221cc223a8a4b4bcf965a9;hpb=729387130d5fba1d085a5f1bcccd20c712ae8f01 diff --git a/libexfat/cluster.c b/libexfat/cluster.c index 13bc6ce..34f027c 100644 --- a/libexfat/cluster.c +++ b/libexfat/cluster.c @@ -67,7 +67,7 @@ static cluster_t s2c(const struct exfat* ef, off_t sector) static uint32_t bytes2clusters(const struct exfat* ef, uint64_t bytes) { uint64_t cluster_size = CLUSTER_SIZE(*ef->sb); - return (bytes + cluster_size - 1) / cluster_size; + return DIV_ROUND_UP(bytes, cluster_size); } cluster_t exfat_next_cluster(const struct exfat* ef,