[ros-dev] [ros-diffs] [pschweitzer] 58960: [RTL] Finally reenable RtlAcquire

Jérôme Gardou jerome.gardou at reactos.org
Mon May 6 17:28:09 UTC 2013


Thanks for the clarification. For some reason, I missed that bit.

ReactOS Development List <ros-dev at reactos.org> wrote on lun., mai 6th, 2013, 8:25 :
> On 06.05.2013 17:48, Jérôme Gardou wrote:
> > Hey Pierre!
> >
> > Nice patch series, that takes ReactOS nearer to being secure. A remark though :
> >
> >>       /*
> >> -     * enable the SeSystemtimePrivilege privilege
> >> +     * Call SetLocalTime twice to ensure correct results
> >>        */
> >> +    Ret = SetLocalTime(&SetupData->SystemTime) &&
> >> +          SetLocalTime(&SetupData->SystemTime);
> >
> > This is a bit confusing, and the comment doesn't really help. Why would calling the function twice ansure correct result ? Also, this is likely to be optimized away by the compiler, or at least produce a report in static code analysers.
> >
> > I know this isn't pure chance. Any hint as to why you wrote it like this ?
> 
> Even MSDN states that it might be necessary to call SetLocalTime twice: 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms724936%28v=vs.85%29.aspx
> 
> Regards,
> Sven
> 
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev



More information about the Ros-dev mailing list