lkml.org 
[lkml]   [2013]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] remove all uses of printf's %n
>>   seq_setwidth(m, 21);
>> seq_printf(m, "%s%d", con->name, con->index);
>> seq_pad(m, '\n');

> Ooh, I like this a lot! Much cleaner.

That's certainly a good way to do it, too.
My "general principles" filter thinks it should be in a local variable
if it can, but if hiding it in the struct seq_file is fine if people
find that cleaner.

seq_pad could also reset the field to some null value and warn if
it's found in that state. Not a strong preference, though; the error is
fairly harmless and you might not feel it's worth the code size.


\
 
 \ /
  Last update: 2013-09-18 00:01    [W:0.088 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site