* grub-core/fs/ntfs.c (locate_attr): Avoid set in if.

(grub_ntfs_iterate_dir): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-12 18:47:46 +01:00
parent 0331e102c9
commit e7b02f9ec0
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2012-02-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ntfs.c (locate_attr): Avoid set in if.
(grub_ntfs_iterate_dir): Likewise.
2012-02-12 Vladimir Serbinenko <phcoder@gmail.com> 2012-02-12 Vladimir Serbinenko <phcoder@gmail.com>
Efiemu stylistic fixes and gettext. Efiemu stylistic fixes and gettext.

View file

@ -267,13 +267,15 @@ locate_attr (struct grub_ntfs_attr *at, struct grub_ntfs_file *mft,
char *pa; char *pa;
init_attr (at, mft); init_attr (at, mft);
if ((pa = find_attr (at, attr)) == NULL) pa = find_attr (at, attr);
if (pa == NULL)
return NULL; return NULL;
if ((at->flags & GRUB_NTFS_AF_ALST) == 0) if ((at->flags & GRUB_NTFS_AF_ALST) == 0)
{ {
while (1) while (1)
{ {
if ((pa = find_attr (at, attr)) == NULL) pa = find_attr (at, attr);
if (pa == NULL)
break; break;
if (at->flags & GRUB_NTFS_AF_ALST) if (at->flags & GRUB_NTFS_AF_ALST)
return pa; return pa;
@ -800,7 +802,8 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
init_attr (at, mft); init_attr (at, mft);
while (1) 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"); grub_error (GRUB_ERR_BAD_FS, "no $INDEX_ROOT");
goto done; goto done;