OSDN Git Service

Use b2o() in exfat_c2o() for consistency.
authorresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 16 May 2010 08:54:06 +0000 (08:54 +0000)
committerresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 16 May 2010 08:54:06 +0000 (08:54 +0000)
git-svn-id: http://exfat.googlecode.com/svn/trunk@133 60bc1c72-a15a-11de-b98f-4500b42dc123

libexfat/cluster.c

index adebf30..471d067 100644 (file)
 #define BMAP_CLR(bitmap, index) (bitmap)[(index) / 8] &= ~(1u << ((index) % 8))
 
 /*
+ * Block to absolute offset.
+ */
+static off_t b2o(const struct exfat* ef, off_t block)
+{
+       return block << ef->sb->block_bits;
+}
+
+/*
  * Cluster to block.
  */
 static off_t c2b(const struct exfat* ef, cluster_t cluster)
@@ -42,15 +50,7 @@ static off_t c2b(const struct exfat* ef, cluster_t cluster)
  */
 off_t exfat_c2o(const struct exfat* ef, cluster_t cluster)
 {
-       return c2b(ef, cluster) << ef->sb->block_bits;
-}
-
-/*
- * Block to absolute offset.
- */
-static off_t b2o(const struct exfat* ef, uint32_t block)
-{
-       return (off_t) block << ef->sb->block_bits;
+       return b2o(ef, c2b(ef, cluster));
 }
 
 /*