lkml.org 
[lkml]   [2014]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] lib/vsprintf: add %pT[C012] format specifier
From
Date
Joe Perches wrote:
> On Mon, 2014-01-06 at 23:00 +0900, Tetsuo Handa wrote:
> > Joe Perches wrote:
> > > Is this really necessary?
> > No problem. %pT[012] are simply optimization (reducing number of function
> > arguments for saving text size) and therefore I can drop them.
> > What about below patch?
>
> Hi Tetsuo. Just a nit.
>
> > diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> []
> > @@ -1232,7 +1248,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> > {
> > int default_width = 2 * sizeof(void *) + (spec.flags & SPECIAL ? 2 : 0);
> >
> > - if (!ptr && *fmt != 'K') {
> > + if (!ptr && *fmt != 'K' && *fmt != 'T') {
>
> I think this new 'T' comparison isn't necessary.

This is needed for allowing comm_name() to accept NULL instead of current.


\
 
 \ /
  Last update: 2014-01-06 23:01    [W:0.105 / U:1.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site