Re: cvs commit: squid/src MemBuf.c

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 17 Apr 2002 23:31:08 +0200

Alex Rousskov wrote:

> Original design note:
>
> memBufAppend should not be used on strings [that
> need implicit \0 termination]. Use memBufPrintf for that.
> memBufAppend is for appending raw opaque data.

packerToMem is one of your inventions, isn't it?
(initializes packing of HTTP headers into a MemObj as single a large
string)

> Adding a termination character after appending S raw bytes to a buffer
> of size S is expensive and totally unnecessary.

Expensive: Marginally
Unnecessary: Perhaps, when the code has been fully audited.

Regards
Henrik
Received on Wed Apr 17 2002 - 16:04:51 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:12 MST