On 2016-07-08 19:52, zhu(a)svn.reactos.org wrote:
> --- branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c [iso-8859-1] (original)
> +++ branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c [iso-8859-1] Fri Jul 8 17:52:42 2016
> @@ -33,6 +33,8 @@
> static LIST_ENTRY AddressListHead;
>
> /* implementation in testing */
> +/* Must already hold the Context->RequestListLock */
> +/* Context should be in ->FileObject->FsContext */
You know there is a way to actually tell that to MSVC's static
analyzer, right? ;)
You want something like
_IRQL_requires_(DISPATCH_LEVEL)
_IRQL_requires_same_
_Requires_lock_held_(((PTCP_CONTEXT)IrpSp->FileObject->FsContext)->RequestListLock)
The last one might be a little too complicated to actually include, but
the IRQL ones are easy to help indicate things like this.
> NTSTATUS
> PrepareIrpForCancel(
> PIRP Irp,
On Fri, Jul 8, 2016 at 6:18 AM, <gedmurphy(a)svn.reactos.org> wrote:
>
> + if (OpenPacket->InternalFlags & IOP_USE_TOP_LEVEL_DEVICE_HINT)
> + {
> + // FIXME: Verify our device object is good to use
> + ASSERT(DirectOpen == FALSE);
> }
You probably want to take a look at IopCheckTopDeviceHint
Best regards,
Alex Ionescu
This change in incorrect, FltObectDereference does return a value.
It's the public definition that's does match the function.
-----Original Message-----
From: Ros-diffs [mailto:ros-diffs-bounces@reactos.org] On Behalf Of hbelusca(a)svn.reactos.org
Sent: 08 July 2016 18:45
To: ros-diffs(a)reactos.org
Subject: [ros-diffs] [hbelusca] 71864: [FLTMGR]: Remove a MSVC warning: FltObjectDereference, whose prototype is publicly defined in fltkernel.h, doesn't return any value.
Author: hbelusca
Date: Fri Jul 8 17:44:59 2016
New Revision: 71864
URL: http://svn.reactos.org/svn/reactos?rev=71864&view=rev
Log:
[FLTMGR]: Remove a MSVC warning: FltObjectDereference, whose prototype is publicly defined in fltkernel.h, doesn't return any value.
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, tthompson(a)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/fre…
> ==============================================================================
> --- 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/filesyst…
> ==============================================================================
> --- 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.
On Mon, Jul 4, 2016 at 1:28 PM, <hbelusca(a)svn.reactos.org> wrote:
> + if (!NT_SUCCESS(Status))
> + _SEH2_LEAVE;
> + }
>
For the love of God can you please follow our coding standards.
Also, I'm pretty familiar with this code path -- are you sure that this is
the correct place to do this duplication?
Best regards,
Alex Ionescu