OSDN Git Service

Use ROUND_UP() macro instead of DIV_ROUND_UP().
authorrelan <relan@users.noreply.github.com>
Sun, 15 Jan 2017 17:52:39 +0000 (20:52 +0300)
committerrelan <relan@users.noreply.github.com>
Sun, 15 Jan 2017 17:52:39 +0000 (20:52 +0300)
libexfat/utils.c

index fd304b2..e2c85f2 100644 (file)
@@ -37,8 +37,7 @@ void exfat_stat(const struct exfat* ef, const struct exfat_node* node,
        stbuf->st_uid = ef->uid;
        stbuf->st_gid = ef->gid;
        stbuf->st_size = node->size;
-       stbuf->st_blocks = DIV_ROUND_UP(node->size, CLUSTER_SIZE(*ef->sb)) *
-               CLUSTER_SIZE(*ef->sb) / 512;
+       stbuf->st_blocks = ROUND_UP(node->size, CLUSTER_SIZE(*ef->sb)) / 512;
        stbuf->st_mtime = node->mtime;
        stbuf->st_atime = node->atime;
        /* set ctime to mtime to ensure we don't break programs that rely on ctime