Re: /bzr/squid3/trunk/ r11692: Cleanup: make IP address show AnyAddr() as v4 or v6

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 30 Aug 2011 16:55:45 -0600

On 08/30/2011 09:51 AM, Amos Jeffries wrote:

> + if (IsIPv6())
> + memcpy(buf,"::\0", min(static_cast<unsigned int>(3),blen));
> + else if (IsIPv4())
> + memcpy(buf,"0.0.0.0\0", min(static_cast<unsigned int>(8),blen));

There should be no reason to put a second 0-terminator into a
"guaranteed to be 0-terminated" string constant.

Cheers,

Alex.
Received on Tue Aug 30 2011 - 22:56:04 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 31 2011 - 12:00:03 MDT