yaffs2: Fix miscalculation of devname buffer length
The following build warning helps us find a real mishandling of array length. fs/yaffs2/yaffs_vfs.c:122:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] If an array is passed as a function parameter it'll be treated as a simple pointer and thus sizeof will return the length of a pointer rather than the length of the array. Add and pass the buffer length to make it work correctly. Signed-off-by:He Zhe <zhe.he@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment