[PATCH 0/6] virXMLPropStringLimit removal follow-up

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

 



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(-)

-- 
2.31.1




[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