From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 29 Jul 2014 16:35:32 +0200 From: Heiko Carstens 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: Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: 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 List-ID: 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.