diff options
| author | David Howells <dhowells@redhat.com> | 2017-07-04 17:25:02 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-06 11:51:10 +0200 |
| commit | c3adf4ac17b9a3957e9feb108aedaca807389cee (patch) | |
| tree | 626fdb75333b45dcaaa0328745d8942122832f42 /include/linux/cache.h | |
| parent | 71f684be4b39cc2b0576db7da67195fdd958de0a (diff) | |
Provide a function to create a NUL-terminated string from unterminated data
commit f35157417215ec138c920320c746fdb3e04ef1d5 upstream.
Provide a function, kmemdup_nul(), that will create a NUL-terminated string
from an unterminated character array where the length is known in advance.
This is better than kstrndup() in situations where we already know the
string length as the strnlen() in kstrndup() is superfluous.
Change-Id: I52f8594090d324c4aa9530c0ad9d287ac43ac0fc
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/cache.h')
0 files changed, 0 insertions, 0 deletions
