Bluetooth: hidp: using strlcpy instead of strncpy, also beautify code.
For NULL terminated string, need always let it ended by zero. Since have already called memcpy() to initialize 'ci', so need not redundant initialization. Better use ''if(session->hid) {} else if(session->input) {}"" instead of ''if(session->hid) {}; if(session->input) {};'' Signed-off-by: NChen Gang <gang.chen@asianux.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
Showing
想要评论请 注册 或 登录