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:
Chen Gang <gang.chen@asianux.com>
Reviewed-by:
David Herrmann <dh.herrmann@gmail.com>
Acked-by:
Jiri Kosina <jkosina@suse.cz>
Signed-off-by:
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
parent
0a804654
Please register or sign in to comment