From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <518B62E6.1040905@asianux.com> Date: Thu, 09 May 2013 16:48:38 +0800 From: Chen Gang MIME-Version: 1.0 To: Jiri Kosina CC: Gustavo Padovan , David Herrmann , Marcel Holtmann , Johan Hedberg , David Miller , 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=UTF-8 List-ID: On 05/09/2013 04:42 PM, Jiri Kosina wrote: > On Wed, 8 May 2013, 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) {};'' >> > >> > Signed-off-by: Chen Gang > Makes sense. > > Acked-by: Jiri Kosina > > Gustavo, going to take this, please? > > -- Jiri Kosina SUSE Labs > Thanks, and also help to fix the spelling: redundent -> redundant. (if need let me send patch v3, please reply to tell me, thanks) -- Chen Gang Asianux Corporation