diff options
author | pfg <pfg@FreeBSD.org> | 2015-01-24 21:23:53 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-01-24 21:23:53 +0000 |
commit | ea5c22141afa510d64c0ea12ec948e9f45a1b03d (patch) | |
tree | 07658395a26293b89877a24a1ededee87015071d | |
parent | bac6ad8875aa62f8c20f3e4957ce1f8b3c3137ea (diff) | |
download | FreeBSD-src-ea5c22141afa510d64c0ea12ec948e9f45a1b03d.zip FreeBSD-src-ea5c22141afa510d64c0ea12ec948e9f45a1b03d.tar.gz |
MFC r277301:
ext2: cosmetical issues
Minor sorting and note when the cases are expected to fall through.
-rw-r--r-- | sys/fs/ext2fs/ext2_hash.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_hash.c b/sys/fs/ext2fs/ext2_hash.c index 50a3811..663a2df 100644 --- a/sys/fs/ext2fs/ext2_hash.c +++ b/sys/fs/ext2fs/ext2_hash.c @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int slen, uint32_t *dst, int dlen, { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int len, switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int len, break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char); |