strlcpy is smart enough
strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <osstklei@de.ibm.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJeff Garzik <jeff@garzik.org>
Showing
想要评论请 注册 或 登录