Hi
I committed a version without the range check so I removed stdint.h as
well.
Although I can't believe I didn't notice that p == NULL stuff in the man
page. Ugh. I'll fix it like you say and also have a look at a
replacement for the L stuff as Stefan mentioned in a bit.
Thanks
On Tue, Jul 05, 2011 at 01:52:06PM -0400, Todd C. Miller wrote:
> The code looks fine to me, though you don't need to include stdint.h.
> It is basically identical to what is in FreeBSD too.
>
> In the man page example:
>
> if (p = wcsdup(L"foobar"), p == NULL) {
>
> I think it is best to either write this as:
>
> if ((p = wcsdup(L"foobar")) == NULL) {
>
> or just split it into two lines. Using the comma operator that way
> is correct but likely to confuse some readers. Also, what is that
> 'L' doing there before the "foobar"? Is it some sort of wide char
> thing I'm not aware of?
>
> - todd