bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/8] Avoid hashing garbage for short keynames.


From: olafBuddenhagen
Subject: Re: [PATCH 2/8] Avoid hashing garbage for short keynames.
Date: Fri, 13 Aug 2010 08:59:57 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

On Wed, Aug 11, 2010 at 07:04:17PM -0300, Diego Nieto Cid wrote:
> 2010/8/9  <olafBuddenhagen@gmx.net>:

> > Hm, why tmp[5]? The way I read the code, only 4 entries are used...
> 
> Well it's the null that terminates the string.

But you specified "4" in the strncpy()... AFAIK it will omit the \0 if
there are 4 non-\0 characters. If you wanted to preserve the \0, you'd
have to use "5" in both places. However, ...

> But as this isn't used as a string it probably does not make much
> sense.

Indeed.

-antrik-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]