Thread (22 messages) 22 messages, 4 authors, 2014-02-06

Re: [PATCH v7 1/3] mm: add kstrdup_trimnl function

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2014-02-05 21:50:56
Also in: linux-mm, lkml

On Tue,  4 Feb 2014 12:43:49 -0800 Sebastian Capella [off-list ref] wrote:
kstrdup_trimnl creates a duplicate of the passed in
null-terminated string.  If a trailing newline is found, it
is removed before duplicating.  This is useful for strings
coming from sysfs that often include trailing whitespace due to
user input.
hm, why?  I doubt if any caller of this wants to retain leading and/or
trailing spaces and/or tabs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help