Actually, this (duplicated) function looks quite poorly designed (not
your fault, obviously :-p).
The more you fix it, the more it seems natural that the first specific
case should be integrated in the while loop for real. That would make
the function more robust, with less duplicated code (and thus, less bugs
:-p).

GSoC note: this is not a "todo" task. This is just an open discussion
about a possible improvement if some day someone's bored.

Le 04/07/2016 19:02, tthomp...@svn.reactos.org a écrit :
> Author: tthompson
> Date: Mon Jul  4 17:02:10 2016
> New Revision: 71807
> 
> URL: http://svn.reactos.org/svn/reactos?rev=71807&view=rev
> Log:
> [NTFS][FREELDR]
> Fix ReadAttribute() and NtfsReadAttribute() in the case when an attribute 
> contains two data runs; Remove extra if statement that prevents second data 
> run from being read after it's decoded.
> 
> Modified:
>     branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c
>     branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
> 
> Modified: branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c
> URL: 
> http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c?rev=71807&r1=71806&r2=71807&view=diff
> ==============================================================================
> --- branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c        
> [iso-8859-1] (original)
> +++ branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c        
> [iso-8859-1] Mon Jul  4 17:02:10 2016
> @@ -320,9 +320,6 @@
>              }
>              else
>                  DataRunStartLCN = -1;
> -
> -            if (*DataRun == 0)
> -                return AlreadyRead;
>          }
>  
>          while (Length > 0)
> 
> Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
> URL: 
> http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c?rev=71807&r1=71806&r2=71807&view=diff
> ==============================================================================
> --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c    [iso-8859-1] 
> (original)
> +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c    [iso-8859-1] 
> Mon Jul  4 17:02:10 2016
> @@ -384,9 +384,6 @@
>              }
>              else
>                  DataRunStartLCN = -1;
> -
> -            if (*DataRun == 0)
> -                return AlreadyRead;
>          }
>  
>          while (Length > 0)
> 
> 


-- 
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.

Attachment: smime.p7s
Description: Signature cryptographique S/MIME

_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to