Re: [PATCH v2 cosmetic] Remove trailing newline in elevator switch error message

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

 



On Mon, 2017-05-01 at 18:29 +0200, markus@xxxxxxxxxxxxxxx wrote:
> +	strlcpy(elevator_name, name, sizeof(elevator_name));
> +	strstrip(elevator_name);
> +	ret = __elevator_change(q, elevator_name);

Hello Markus,

Are you aware that the current implementation of __elevator_change() strips
leading whitespace but that with your patch applied leading whitespace is no
longer removed from the elevator name? If you have a look at strim() in
lib/string.c you will see that in case of leading whitespace that function
does not remove the leading whitespace but returns a pointer to the first
non-whitespace character.

Otherwise this patch looks fine to  me.

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux