[radvd-devel-l] [radvd] write the PID file in its own function, use a regex to validate (41c6192)

Reuben Hawkins reubenhwk at gmail.com
Mon Jan 16 12:42:25 EST 2012


On Mon, Jan 16, 2012 at 9:31 AM, Reuben Hawkins <reubenhwk at gmail.com> wrote:
> On Mon, Jan 16, 2012 at 9:24 AM, Reuben Hawkins <reubenhwk at gmail.com> wrote:
>> On Sun, Jan 15, 2012 at 11:32 PM, theMIROn
>> <reply+c-869907-566b8009fb5e02bdc3a199c42d37526e579246b4-201595 at reply.github.com>
>> wrote:
>>> is regex really needed?
>>> simple strtoul will do the work, even if you need error checking.
>>>
>>> ---
>>> Reply to this email directly or view it on GitHub:
>>> https://github.com/reubenhwk/radvd/commit/41c6192041879cbad8591d318e3b0e758edecf16#commitcomment-869907
>>
>> The regex isn't really needed, but it is a somewhat stricter
>> validation tool compared to strtoul.  Other than it not being needed,
>> is there a good reason to use strtoul over regex?
>
> Now that I'm looking at the regex code, I'm seeing a few problems with
> it.  It's all wrong....  It'll need to be either fixed, or replaced.
> Should I just use strtoul instead?

The regex code has been removed and replaces with atol (which is what
was converting the string to a pid in the first place).  I'll send out
a 1.8.4rc2 shortly.



More information about the radvd-devel-l mailing list