Re: [PATCH] scsi: scsi_devinfo.c: Cleaning up unnecessarily complicated in conjunction with strncpy

2014-09-15 Thread Rickard Strandqvist
2014-09-15 0:38 GMT+02:00 Elliott, Robert (Server Storage) : > > >> -Original Message- >> From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] >> How do you mean? >> >> strncpy zeroes throughout the remainder of the string "from" until the >> length off to_length, or ot

RE: [PATCH] scsi: scsi_devinfo.c: Cleaning up unnecessarily complicated in conjunction with strncpy

2014-09-14 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] > How do you mean? > > strncpy zeroes throughout the remainder of the string "from" until the > length off to_length, or otherwise guaranteed trailing zero characters > and a warning is print

Re: [PATCH] scsi: scsi_devinfo.c: Cleaning up unnecessarily complicated in conjunction with strncpy

2014-09-14 Thread Rickard Strandqvist
2014-09-14 23:34 GMT+02:00 Elliott, Robert (Server Storage) : > > >> -Original Message- >> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >> ow...@vger.kernel.org] On Behalf Of Rickard Strandqvist > ... >> diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c >

RE: [PATCH] scsi: scsi_devinfo.c: Cleaning up unnecessarily complicated in conjunction with strncpy

2014-09-14 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Rickard Strandqvist ... > diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c ... > static void scsi_strcpy_devinfo(char *name, char *to, size_t to_l