lib: pull base-guessing logic to helper function
The default base is 10 unless there is a leading zero, in which case the base will be guessed as 8. The base will only be guesed as 16 when the string starts with '0x' the third character is a valid hex digit. Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录