one zeroes, one doesn't.
calloc is meant to be "x objects of size y", but its effectively also a bzero().
Adrian
2008/9/2 Amos Jeffries <squid3_at_treenet.co.nz>:
>>
>> On 01/09/2008, at 1:01 PM, Amos Jeffries wrote:
>>
>>>> Resubmit this patch, including changes based on comments by various
>>>> people.
>>>>
>>>> - Mention RFC text in relation to changing the default behaviour in
>>>> relation
>>>> to unknown HTTP methods.
>>>> - Use safe_free instead of xfree.
>>>> - Rework urlAbsolute to use snprintf in a slightly better way.
>>>> Snprintf
>>>> is now
>>>> used to construct the initial portion of the url and the rest is
>>>> added
>>>> on
>>>> using POSIX string routines.
>>>>
>>>
>>> I'm sure you can still crop the xstrdup() usage by adding a JIT
>>> allocation
>>> of urlbuf before "if (req->protocol == PROTO_URN)"
>>> and returning urlbuf plain at the end.
>>
>> As in malloc it?
>
> Yes with xmalloc or xcalloc. (I'm still not sure why we have two).
>
> Amos
>
>
>
Received on Tue Sep 02 2008 - 01:42:12 MDT
This archive was generated by hypermail 2.2.0 : Tue Sep 02 2008 - 12:00:02 MDT