]> git.sur5r.net Git - u-boot/commit
Fix return value in trailing_strtoln()
authorSimon Glass <sjg@chromium.org>
Thu, 6 Oct 2016 02:42:11 +0000 (20:42 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 11 Oct 2016 03:55:33 +0000 (11:55 +0800)
commitb91c6a1209e7da1a7f989d9ac35d0d8be0b7b710
treed54528122107568533816e0e8629fd753a2bec24
parenta5b8722532729c62370b6abb278420804d5d071b
Fix return value in trailing_strtoln()

This function should return -1 if there is no trailing integer in the
string. Instead it returns 0. Fix it by checking for this condition at the
start.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
lib/strto.c