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

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

 



On Tue,  4 Feb 2014 12:43:49 -0800 Sebastian Capella <sebastian.capella@xxxxxxxxxx> 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.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]