[PATCH 0/6] virXMLPropStringLimit removal follow-up
Ján Tomko
jtomko at redhat.com
Thu Nov 25 13:58:12 UTC 2021
On a Thursday in 2021, Peter Krempa wrote:
>Tim pointed out that some of the code could be simplified a bit more by
>using virTristateBool parsing functions and also that strnlen could be
>used instead of strlen.
>
>This series does those cleanups as well as one further refactor of
>character verification in virDomainDeviceLoadparmIsValid.
>
>Peter Krempa (6):
> util: enum: Add helpers for converting virTristate* to a plain bool
> conf: seclabel: Parse booleans using virXMLPropTristateBool instead of
> virStringParseYesNo
> internal: Add STRLIM macro for checking string length using strnlen()
> virDomainDeviceLoadparmIsValid: Simplify value lenght check
> virDomainDeviceLoadparmIsValid: Use 'strspn' instead of a loop
> conf: domain: Convert all string length checks to STRLIM
>
> src/conf/domain_conf.c | 83 +++++++------------
> src/internal.h | 9 ++
> src/libvirt_private.syms | 2 +
> src/util/virenum.c | 54 ++++++++++++
> src/util/virenum.h | 2 +
> .../machine-loadparm-s390-char-invalid.err | 2 +-
> .../machine-loadparm-s390-len-invalid.err | 2 +-
> 7 files changed, 99 insertions(+), 55 deletions(-)
>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211125/a3c9f24a/attachment-0001.sig>
More information about the libvir-list
mailing list