OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb1a999
)
Remove excessive check in free_cluster().
author
relan
<relan@users.noreply.github.com>
Fri, 17 Mar 2017 06:41:47 +0000
(09:41 +0300)
committer
relan
<relan@users.noreply.github.com>
Sun, 19 Mar 2017 16:10:38 +0000
(19:10 +0300)
Cluster validity has already been checked.
libexfat/cluster.c
patch
|
blob
|
history
diff --git
a/libexfat/cluster.c
b/libexfat/cluster.c
index
19b7d0d
..
5a26133
100644
(file)
--- a/
libexfat/cluster.c
+++ b/
libexfat/cluster.c
@@
-214,10
+214,8
@@
static cluster_t allocate_cluster(struct exfat* ef, cluster_t hint)
static void free_cluster(struct exfat* ef, cluster_t cluster)
{
- if (CLUSTER_INVALID(*ef->sb, cluster))
- exfat_bug("freeing invalid cluster 0x%x", cluster);
if (cluster - EXFAT_FIRST_DATA_CLUSTER >= ef->cmap.size)
- exfat_bug("
freeing non-existing cluster 0x%x (0x%
x)", cluster,
+ exfat_bug("
caller must check cluster validity (%#x, %#
x)", cluster,
ef->cmap.size);
BMAP_CLR(ef->cmap.chunk, cluster - EXFAT_FIRST_DATA_CLUSTER);