[libvirt] [PATCH 5/5] Use virStringHasSuffix() where possible

Peter Krempa pkrempa at redhat.com
Thu Mar 7 07:55:45 UTC 2019


On Wed, Mar 06, 2019 at 17:54:04 +0100, Andrea Bolognani wrote:
> When dealing with internal paths we don't need to worry about
> whether or not suffixes are lowercase since we have full control
> over them, which means we can avoid performing case-insensitive
> string comparisons.
> 
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  src/conf/virsecretobj.c  | 2 +-
>  src/conf/virstorageobj.c | 2 +-
>  src/libvirt_private.syms | 1 +
>  src/vmx/vmx.c            | 2 +-
>  tests/testutils.c        | 4 ++--
>  tests/virschematest.c    | 4 ++--
>  tools/nss/libvirt_nss.c  | 4 ++--
>  7 files changed, 10 insertions(+), 9 deletions(-)

[...]

> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index d7ccd509e9..1eab68622d 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -2958,6 +2958,7 @@ virStringFilterChars;
>  virStringHasCaseSuffix;
>  virStringHasChars;
>  virStringHasControlChars;
> +virStringHasSuffix;

This should be in previous commit.

>  virStringIsEmpty;
>  virStringIsPrintable;
>  virStringListAdd;

ACK with that fixed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190307/6bcf470c/attachment-0001.sig>


More information about the libvir-list mailing list