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) elli...@hp.com: -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

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

2014-09-14 Thread Rickard Strandqvist
I have revamped the code so it becomes both more effective and far more clear. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/scsi/scsi_devinfo.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git

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) elli...@hp.com: -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

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 printed.