1 ext4: remove useless test and assignment in strtohash functions
3 From: Damien Guibouret <damien.guibouret@partition-saving.com>
5 On transformation of str to hash, computed value is initialised before
6 first byte modulo 4. But it is already initialised before entering loop
7 and after processing last byte modulo 4. So the corresponding test and
8 initialisation could be removed.
10 Signed-off-by: Damien Guibouret <damien.guibouret@partition-saving.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 fs/ext4/hash.c | 4 ----
14 1 file changed, 4 deletions(-)
16 diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c
17 index 38b8a96..00c6dd2 100644
20 @@ -148,8 +148,6 @@ static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num)
23 for (i = 0; i < len; i++) {
26 val = ((int) scp[i]) + (val << 8);
29 @@ -176,8 +174,6 @@ static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num)
32 for (i = 0; i < len; i++) {
35 val = ((int) ucp[i]) + (val << 8);