grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Corrections to affs and sfs


From: Krzysztof Smiechowicz
Subject: Re: [PATCH] Corrections to affs and sfs
Date: Tue, 06 Jan 2009 18:44:46 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Robert Millan pisze:

Index: fs/sfs.c
===================================================================
--- fs/sfs.c    (revision 1919)
+++ fs/sfs.c    (working copy)
@@ -172,7 +172,8 @@
          return grub_errno;
        }
- for (i = 0; i < grub_be_to_cpu16 (tree->nodes); i++)
+      grub_uint16_t nodescount = grub_be_to_cpu16(tree->nodes);
+      for (i = nodescount - 1; i >= 0; i--)

nodescount is only used once; why adding a variable?

          /* Follow the tree down to the leaf level.  */
-         if ((grub_be_to_cpu32 (EXTNODE(tree, i)->key) >= block)
+         if ((grub_be_to_cpu32 (EXTNODE(tree, i)->key) <= block)
              && !tree->leaf)
            {
-             next = grub_be_to_cpu32 (EXTNODE (tree, i - 1)->data);
-             break;
-           }
-
-         /* In case the last node is reached just use that one, it is
-            the right match.  */
-         if (i + 1 == grub_be_to_cpu16 (tree->nodes) && !tree->leaf)
-           {
              next = grub_be_to_cpu32 (EXTNODE (tree, i)->data);
              break;
            }

I'm not familiar with our SFS code.  Marco, if you have a minute could you
review this part?


Hello,

Any news about applying this patch? :)

Best regards,
Krzysztof
AROS Development Team




reply via email to

[Prev in Thread] Current Thread [Next in Thread]