mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-11 13:34:45 -05:00
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:
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user