util: Rename virFileHasSuffix() to virStringHasCaseSuffix()

Despite its name, this is really just a general-purpose string
manipulation function, so it should be moved to the virstring
module and renamed accordingly.

In addition to the obvious s/File/String/, also tweak the name
to make it clear that the presence of the suffix is verified
using case-insensitive comparison.

A few trivial whitespace changes are squashed in.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Andrea Bolognani
2019-03-07 10:08:47 +01:00
parent ab2e90006d
commit 2de7dcba7e
15 changed files with 35 additions and 36 deletions
+2 -2
View File
@@ -525,8 +525,8 @@ virTestRewrapFile(const char *filename)
char *script = NULL;
virCommandPtr cmd = NULL;
if (!(virFileHasSuffix(filename, ".args") ||
virFileHasSuffix(filename, ".ldargs")))
if (!(virStringHasCaseSuffix(filename, ".args") ||
virStringHasCaseSuffix(filename, ".ldargs")))
return 0;
if (!perl) {