Thread (15 messages) 15 messages, 4 authors, 2013-05-21

Re: [PATCH v2] Bluetooth: hidp: using strlcpy instead of strncpy, also beautify code.

From: Chen Gang <hidden>
Date: 2013-05-09 01:07:10
Also in: linux-bluetooth

On 05/08/2013 11:16 PM, David Herrmann wrote:
On Wed, May 8, 2013 at 5:34 AM, Chen Gang [off-list ref] wrote:
quoted
quoted
For NUL terminated string, need always let it ended by zero.

Since have already called memcpy() to initialize 'ci', so need not
redundent initializations.

Better use ''if(session->hid) {} else if(session->input) {}'' instead
of ''if(session->hid) {}; if(session->input) {};''
Yep, looks good now.

Reviewed-by: David Herrmann <redacted>
Thanks.

-- 
Chen Gang

Asianux Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help