]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/fs/ntfs.c (grub_ntfs_iterate_dir): Use grub_uint8_t for
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 21 Oct 2013 01:23:57 +0000 (03:23 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 21 Oct 2013 01:23:57 +0000 (03:23 +0200)
mask rather than 64-bit type.

Saves 20 bytes on compressed image.

ChangeLog
grub-core/fs/ntfs.c

index 47fb57b0f6965eb12149186f69d4a2aa6943dcc2..1e9a554fc5d53e5dfbff620c9c2931fc6f39b854 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-10-21  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/fs/ntfs.c (grub_ntfs_iterate_dir): Use grub_uint8_t for
+       mask rather than 64-bit type.
+
+       Saves 20 bytes on compressed image.
+
 2013-10-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/fs/ntfs.c (read_data): Move code for compressed data to ...
index 04bf8b5a5f10f7fb81d55b6f58e6216bc16bf311..3ed926dc6e2ccd615667aab039c74e274dcf56a0 100644 (file)
@@ -839,7 +839,8 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
 
   if (bitmap)
     {
-      grub_disk_addr_t v, i;
+      grub_disk_addr_t i;
+      grub_uint8_t v;
 
       indx = grub_malloc (mft->data->idx_size << GRUB_NTFS_BLK_SHR);
       if (indx == NULL)
@@ -862,7 +863,7 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
                goto done;
            }
          v <<= 1;
-         if (v >= 0x100)
+         if (!v)
            {
              v = 1;
              bitmap++;