Make it more similar to virStringStripSuffix(), which also results in types being more correct since STRCASEEQ() returns int rather than bool.
Signed-off-by: Andrea Bolognani <abolo...@redhat.com> --- src/util/virstring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index a938669b63..e47d76accd 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -1261,7 +1261,10 @@ virStringHasCaseSuffix(const char *str, if (len < suffixlen) return false; - return STRCASEEQ(str + len - suffixlen, suffix); + if (STRCASENEQ(str + len - suffixlen, suffix)) + return false; + + return true; } bool -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list