]> git.baikalelectronics.ru Git - kernel.git/commit
lib: Clarify the return value of strnlen_user()
authorJan Kara <jack@suse.cz>
Wed, 3 Jun 2015 13:50:35 +0000 (15:50 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jun 2015 15:00:22 +0000 (08:00 -0700)
commitc1c3dd8ab5489cf2b3297aed0839a979941fb7af
tree7b957c610ea1df9e099173ac29e84ef7ca6856b4
parentc2a27aba9b22245ac6a724c9b5f10117fa46a52e
lib: Clarify the return value of strnlen_user()

strnlen_user() can return a number in a range 0 to count +
sizeof(unsigned long) - 1. Clarify the comment at the top of the
function so that users don't think the function returns at most count+1.

Signed-off-by: Jan Kara <jack@suse.cz>
[ Also added commentary about preferably not using this function ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/strnlen_user.c