[ros-dev] [EVENTVWR/EVENTLOG] Fix a double off-by-one bug
Love Nystrom
love.nystrom at gmail.com
Sun May 8 17:37:16 UTC 2011
Hi Eric,
Sounds like you got it licked, the right way.
Good job !
Best Regards
L.
2011/5/6 <ros-dev-request at reactos.org>
> From: Eric Kohl <eric.kohl at t-online.de>
> To: ReactOS Development List <ros-dev at reactos.org>
> Date: Thu, 05 May 2011 22:41:24 +0200
> Subject: Re: [ros-dev] [EVENTVWR/EVENTLOG] Fix a double off-by-one bug
> Hi Love,
>
> I just committed a fix for the calculation of the available number of event
> records. It addresses the issues you mentioned.
>
> And this is how it works:
> When a new log file is created, the first (or oldest) record gets the
> record number 1. With each new event record the record number is incremented
> by 1. To get the number of records in the log file we need to subtract the
> OldestRecordNumber from the CurrentRecordNumber. If the log file is empty
> the OldestRecordNumber will be 0. In this case we will return 0 for the
> number of event records.
>
> Now we call clear a filled log file and fill it with new records. The
> oldest record will not be record number 1 but we can still return the true
> number of records in the log file.
>
>
> Regards
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20110509/839d19eb/attachment.htm>
More information about the Ros-dev
mailing list