← Commit list

69d9edc6f

Denys Vlasenko
Denys Vlasenko
2009-10-17
FAILED Duration: 38s

Subject

mkfs_ext2: code shrink

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mkfs_ext2.c+1 -3
@@ -275,9 +275,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
* don't check all the filesystems at the same time. We use a
* kludgy hack of using the UUID to derive a random jitter value.
*/
- for (i = 0, n = 0; i < sizeof(sb->s_uuid); i++)
- n += sb->s_uuid[i];
- sb->s_max_mnt_count += n % EXT2_DFL_MAX_MNT_COUNT;
+ sb->s_max_mnt_count += sb->s_uuid[ARRAY_SIZE(sb->s_uuid)-1] % EXT2_DFL_MAX_MNT_COUNT;
// open the device, get number of blocks
xmove_fd(xopen3(argv[0], O_WRONLY | O_CREAT, 0666), fd);