[PATCH] ntoskrnl.exe: Make alloc_kernel_object() static.

Francois Gouget fgouget at free.fr
Sat Mar 16 16:09:45 CDT 2019


On Fri, 15 Mar 2019, Jacek Caban wrote:

> Hi Francois,
> 
> On 3/15/19 3:14 PM, Francois Gouget wrote:
> > Signed-off-by: Francois Gouget <fgouget at free.fr>
> > ---
> >   dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
> > index 2e78e4595b3..62c188cfc18 100644
> > --- a/dlls/ntoskrnl.exe/ntoskrnl.c
> > +++ b/dlls/ntoskrnl.exe/ntoskrnl.c
> > @@ -264,7 +264,7 @@ static void free_kernel_object( void *obj )
> >       HeapFree( GetProcessHeap(), 0, header );
> >   }
> >   -void *alloc_kernel_object( POBJECT_TYPE type, SIZE_T size, LONG ref )
> > +static void *alloc_kernel_object( POBJECT_TYPE type, SIZE_T size, LONG ref
> > )
> >   {
> >       struct object_header *header;
> 
> The plan is to use this function in other files.

But then there is no declaration in a header file so no other source 
file can use it. So making it static would not hurt and it's easy to 
change back when the time comes. But if there are pending patches it's 
fine to wait for those (and even if not I don't care that much but I may 
come back to it in a few months).

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
  Good judgment comes from experience, and experience comes from bad judgment
                               -- Barry LePatner



More information about the wine-devel mailing list