]> git.dujemihanovic.xyz Git - u-boot.git/commit
lib: string: Fix strlcpy return value
authorSean Anderson <seanga2@gmail.com>
Thu, 11 Mar 2021 05:15:41 +0000 (00:15 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 12 Apr 2021 21:44:55 +0000 (17:44 -0400)
commitd3358ecc54be0bc3b4dd11f7a63eab0a2842f772
treede594fc4a6e853b3a94e829ff92d60446ebd2a1c
parent92e84896112037833e429d629f87cedbeb255d5a
lib: string: Fix strlcpy return value

strlcpy should always return the number of bytes copied. We were
accidentally missing the nul-terminator. We also always used to return a
non-zero value, even if we did not actually copy anything.

Fixes: 23cd138503 ("Integrate USB gadget layer and USB CDC driver layer")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
lib/string.c