hfsplus: assignments inside `if' condition clean-up
Make assignments outside `if' conditions for unicode.c module where the checkpatch.pl script reported this coding style error. Signed-off-by: Anton Salikhmetov <alexo@tuxera.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
This commit is contained in:
parent
032016a56a
commit
2b4f9ca8a5
|
@ -142,7 +142,11 @@ int hfsplus_uni2asc(struct super_block *sb,
|
||||||
/* search for single decomposed char */
|
/* search for single decomposed char */
|
||||||
if (likely(compose))
|
if (likely(compose))
|
||||||
ce1 = hfsplus_compose_lookup(hfsplus_compose_table, c0);
|
ce1 = hfsplus_compose_lookup(hfsplus_compose_table, c0);
|
||||||
if (ce1 && (cc = ce1[0])) {
|
if (ce1)
|
||||||
|
cc = ce1[0];
|
||||||
|
else
|
||||||
|
cc = 0;
|
||||||
|
if (cc) {
|
||||||
/* start of a possibly decomposed Hangul char */
|
/* start of a possibly decomposed Hangul char */
|
||||||
if (cc != 0xffff)
|
if (cc != 0xffff)
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -209,7 +213,8 @@ int hfsplus_uni2asc(struct super_block *sb,
|
||||||
i++;
|
i++;
|
||||||
ce2 = ce1;
|
ce2 = ce1;
|
||||||
}
|
}
|
||||||
if ((cc = ce2[0])) {
|
cc = ce2[0];
|
||||||
|
if (cc) {
|
||||||
ip += i;
|
ip += i;
|
||||||
ustrlen -= i;
|
ustrlen -= i;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -301,7 +306,11 @@ int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr,
|
||||||
while (outlen < HFSPLUS_MAX_STRLEN && len > 0) {
|
while (outlen < HFSPLUS_MAX_STRLEN && len > 0) {
|
||||||
size = asc2unichar(sb, astr, len, &c);
|
size = asc2unichar(sb, astr, len, &c);
|
||||||
|
|
||||||
if (decompose && (dstr = decompose_unichar(c, &dsize))) {
|
if (decompose)
|
||||||
|
dstr = decompose_unichar(c, &dsize);
|
||||||
|
else
|
||||||
|
dstr = NULL;
|
||||||
|
if (dstr) {
|
||||||
if (outlen + dsize > HFSPLUS_MAX_STRLEN)
|
if (outlen + dsize > HFSPLUS_MAX_STRLEN)
|
||||||
break;
|
break;
|
||||||
do {
|
do {
|
||||||
|
@ -346,15 +355,23 @@ int hfsplus_hash_dentry(const struct dentry *dentry, const struct inode *inode,
|
||||||
astr += size;
|
astr += size;
|
||||||
len -= size;
|
len -= size;
|
||||||
|
|
||||||
if (decompose && (dstr = decompose_unichar(c, &dsize))) {
|
if (decompose)
|
||||||
|
dstr = decompose_unichar(c, &dsize);
|
||||||
|
else
|
||||||
|
dstr = NULL;
|
||||||
|
if (dstr) {
|
||||||
do {
|
do {
|
||||||
c2 = *dstr++;
|
c2 = *dstr++;
|
||||||
if (!casefold || (c2 = case_fold(c2)))
|
if (casefold)
|
||||||
|
c2 = case_fold(c2);
|
||||||
|
if (!casefold || c2)
|
||||||
hash = partial_name_hash(c2, hash);
|
hash = partial_name_hash(c2, hash);
|
||||||
} while (--dsize > 0);
|
} while (--dsize > 0);
|
||||||
} else {
|
} else {
|
||||||
c2 = c;
|
c2 = c;
|
||||||
if (!casefold || (c2 = case_fold(c2)))
|
if (casefold)
|
||||||
|
c2 = case_fold(c2);
|
||||||
|
if (!casefold || c2)
|
||||||
hash = partial_name_hash(c2, hash);
|
hash = partial_name_hash(c2, hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -422,12 +439,14 @@ int hfsplus_compare_dentry(const struct dentry *parent,
|
||||||
c1 = *dstr1;
|
c1 = *dstr1;
|
||||||
c2 = *dstr2;
|
c2 = *dstr2;
|
||||||
if (casefold) {
|
if (casefold) {
|
||||||
if (!(c1 = case_fold(c1))) {
|
c1 = case_fold(c1);
|
||||||
|
if (!c1) {
|
||||||
dstr1++;
|
dstr1++;
|
||||||
dsize1--;
|
dsize1--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(c2 = case_fold(c2))) {
|
c2 = case_fold(c2);
|
||||||
|
if (!c2) {
|
||||||
dstr2++;
|
dstr2++;
|
||||||
dsize2--;
|
dsize2--;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue