From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <518AF6BE.1@asianux.com> Date: Thu, 09 May 2013 09:07:10 +0800 From: Chen Gang MIME-Version: 1.0 To: David Herrmann CC: Marcel Holtmann , Gustavo Padovan , Johan Hedberg , David Miller , Jiri Kosina , andrei.emeltchenko@intel.com, "linux-bluetooth@vger.kernel.org" , netdev Subject: Re: [PATCH v2] Bluetooth: hidp: using strlcpy instead of strncpy, also beautify code. References: <518906A8.7060708@asianux.com> <5189A417.503@asianux.com> <5189C7C6.8090408@asianux.com> In-Reply-To: Content-Type: text/plain; charset=GB2312 List-ID: On 05/08/2013 11:16 PM, David Herrmann wrote: > On Wed, May 8, 2013 at 5:34 AM, Chen Gang wrote: >> > >> > 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 Thanks. -- Chen Gang Asianux Corporation