From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753863AbaG2Ofl (ORCPT ); Tue, 29 Jul 2014 10:35:41 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:45528 "EHLO e06smtp15.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753741AbaG2Ofj (ORCPT ); Tue, 29 Jul 2014 10:35:39 -0400 Date: Tue, 29 Jul 2014 16:35:32 +0200 From: Heiko Carstens To: Rickard Strandqvist Cc: Ursula Braun , Martin Schwidefsky , Frank Blaschka , linux-s390@vger.kernel.org, linux390@de.ibm.com, Ursula Braun , linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390: net: ctcm_main.c: Cleaning up missing null-terminate in conjunction with strncpy Message-ID: <20140729143532.GB4202@osiris> References: <1406385234-3123-1-git-send-email-rickard_strandqvist@spectrumdigital.se> <1406639463.13705.9.camel@BR9GV9YG.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14072914-0342-0000-0000-00000096B19F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 29, 2014 at 03:19:47PM +0200, Rickard Strandqvist wrote: > > It is guaranteed that the string ch->id always fits into CTCM_ID_SIZE. > > What's in this case the benefit of replacing strncpy() by strlcpy() > > here? > > If it is really so! It can just as well replacing it with strcpy... Or.. just leave the code alone.