bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 1/8] kern: fix printing of kmem_cache names


From: Richard Braun
Subject: Re: [PATCH 1/8] kern: fix printing of kmem_cache names
Date: Sun, 2 Feb 2014 02:37:57 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Feb 02, 2014 at 12:11:59AM +0100, Samuel Thibault wrote:
> Justus Winter, le Sat 01 Feb 2014 16:34:20 +0100, a écrit :
> > I thought about doing that.  But that would waste one character just
> > for the termination.
> 
> That's little compared to security :)

> > GNU Machs printf implementation supports strings with the precision
> > given as argument:
> > 
> >   printf ("%.*s", sizeof foo->name, foo->name);
> > 
> > I think thats clean, concise and easy to use.
> 
> But people would tend to forget doing it.  We can't really fight that.

Null-terminated strings is what people will naturally expect and have
in mind while reading/editing the code. Doing things differently for
something like mere names isn't worth the trouble.

-- 
Richard Braun



reply via email to

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