mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: Make virStringMatchesNameSuffix() return bool
It's a predicate, so bool is the appropriate return type. Signed-off-by: Andrea Bolognani <abologna@redhat.com> ACKed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
956817ef49
commit
17eb6fc1b8
@ -1279,7 +1279,7 @@ virStringStripSuffix(char *str,
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
virStringMatchesNameSuffix(const char *file,
|
||||
const char *name,
|
||||
const char *suffix)
|
||||
@ -1291,9 +1291,9 @@ virStringMatchesNameSuffix(const char *file,
|
||||
if (filelen == (namelen + suffixlen) &&
|
||||
STREQLEN(file, name, namelen) &&
|
||||
STREQLEN(file + namelen, suffix, suffixlen))
|
||||
return 1;
|
||||
return true;
|
||||
else
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -294,9 +294,9 @@ bool virStringHasCaseSuffix(const char *str,
|
||||
const char *suffix);
|
||||
bool virStringStripSuffix(char *str,
|
||||
const char *suffix) ATTRIBUTE_RETURN_CHECK;
|
||||
int virStringMatchesNameSuffix(const char *file,
|
||||
const char *name,
|
||||
const char *suffix);
|
||||
bool virStringMatchesNameSuffix(const char *file,
|
||||
const char *name,
|
||||
const char *suffix);
|
||||
|
||||
void virStringStripIPv6Brackets(char *str);
|
||||
bool virStringHasChars(const char *str,
|
||||
|
Loading…
Reference in New Issue
Block a user