diff --git a/ChangeLog b/ChangeLog index 09c8e0356..69ac1c095 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-12 Vladimir Serbinenko + + * grub-core/fs/ntfs.c (locate_attr): Avoid set in if. + (grub_ntfs_iterate_dir): Likewise. + 2012-02-12 Vladimir Serbinenko Efiemu stylistic fixes and gettext. diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index 7bd55b12d..a2e014945 100644 --- a/grub-core/fs/ntfs.c +++ b/grub-core/fs/ntfs.c @@ -267,13 +267,15 @@ locate_attr (struct grub_ntfs_attr *at, struct grub_ntfs_file *mft, char *pa; init_attr (at, mft); - if ((pa = find_attr (at, attr)) == NULL) + pa = find_attr (at, attr); + if (pa == NULL) return NULL; if ((at->flags & GRUB_NTFS_AF_ALST) == 0) { while (1) { - if ((pa = find_attr (at, attr)) == NULL) + pa = find_attr (at, attr); + if (pa == NULL) break; if (at->flags & GRUB_NTFS_AF_ALST) return pa; @@ -800,7 +802,8 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir, init_attr (at, mft); while (1) { - if ((cur_pos = find_attr (at, GRUB_NTFS_AT_INDEX_ROOT)) == NULL) + cur_pos = find_attr (at, GRUB_NTFS_AT_INDEX_ROOT); + if (cur_pos == NULL) { grub_error (GRUB_ERR_BAD_FS, "no $INDEX_ROOT"); goto done;