Re: [PATCH] scsi_devinfo: cleanly zero-pad devinfo strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-11-27 at 23:47 +0100, Martin Wilck wrote:
> +	/* This zero-pads the destination */
> +	strncpy(to, from, to_length);
> +	if (from_length < to_length && !compatible)
> +		/*
> +		 * space pad the string if it is short.
> +		 */
> +		memset(&to[from_length], ' ', to_length - from_length);

Since the code block controlled by the if-statement consists of multiple
lines, shouldn't that block be surrounded by braces ({})? Anyway:

Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux