It is unnecessary to check i<4 after the loop; just do it before the
break.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
        /* Check to see if the seed is all zero's */
        if (hinfo->seed) {
                for (i = 0; i < 4; i++) {
-                       if (hinfo->seed[i])
+                       if (hinfo->seed[i]) {
+                               memcpy(buf, hinfo->seed, sizeof(buf));
                                break;
+                       }
                }
-               if (i < 4)
-                       memcpy(buf, hinfo->seed, sizeof(buf));
        }
 
        switch (hinfo->hash_version) {