From: Vladimir 'phcoder' Serbinenko Date: Mon, 21 Oct 2013 11:14:38 +0000 (+0200) Subject: * grub-core/fs/ntfs.c (grub_ntfs_mount): Remove redundant check. X-Git-Tag: grub-2.02-beta1~603 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067e6ae74dea602aee59bc7fe2d44e681c7e7726;p=thirdparty%2Fgrub.git * grub-core/fs/ntfs.c (grub_ntfs_mount): Remove redundant check. Saves 5 bytes on compressed image. --- diff --git a/ChangeLog b/ChangeLog index 5f8e2f496..22c0a12cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-21 Vladimir Serbinenko + + * grub-core/fs/ntfs.c (grub_ntfs_mount): Remove redundant check. + + Saves 5 bytes on compressed image. + 2013-10-21 Vladimir Serbinenko * grub-core/fs/ntfs.c: Move common UTF-16 handling to a separate diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index af5a6da50..a0ae44200 100644 --- a/grub-core/fs/ntfs.c +++ b/grub-core/fs/ntfs.c @@ -907,7 +907,7 @@ grub_ntfs_mount (grub_disk_t disk) spc = (((grub_uint32_t) bpb.sectors_per_cluster * (grub_uint32_t) grub_le_to_cpu16 (bpb.bytes_per_sector)) >> GRUB_NTFS_BLK_SHR); - if (spc == 0 || (spc & (spc - 1))) + if (spc == 0) goto fail; for (data->log_spc = 0; (1U << data->log_spc) < spc; data->log_spc++);