Re: [PATCH 3/6] internal: Add STRLIM macro for checking string length using strnlen()

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

 



On a Thursday in 2021, Peter Krempa wrote:
As a microoprimization when checking whether length of a string fits
into a limit we don't necessarily need to calculate the full lenght but

length

can use strnlen to check only LIMIT+1 chars. Add a macro which will
simplify the expressions.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
src/internal.h | 9 +++++++++
1 file changed, 9 insertions(+)

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux