Re: [PATCH v4 3/5] string: add strends() helper to check if a string ends with a suffix

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

 



On Mon, Sep 30, 2024 at 01:30:10PM +0200, Christian Marangi wrote:
> Add strends() helper to check if a string ends with a suffix. The
> unreadable strends is chosen to keep consistency with the parallel
> strstarts helper used to check if a string starts with a prefix.

strstarts()

> To prevent out-of-bounds read, len of string is checked against the
> prefix length before comparing the 2 string at the offset.

...

> +/**
> + * strends - does @str end with @suffix?
> + * @str: string to examine
> + * @suffix: suffix to look for.

Please, run kernel doc validator

	scripts/kernel-doc -Wall -none ...

and fix the warning.

> + */

-- 
With Best Regards,
Andy Shevchenko






[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