提交 fcf78395 编写于 作者: A Andrea Bolognani

util: Make virStringHasCaseSuffix() return bool

It's a predicate, so bool is the appropriate return type.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
ACKed-by: NPeter Krempa <pkrempa@redhat.com>
上级 696239ba
......@@ -1248,7 +1248,7 @@ virStringHasSuffix(const char *str,
return STREQ(str + len - suffixlen, suffix);
}
int
bool
virStringHasCaseSuffix(const char *str,
const char *suffix)
{
......@@ -1256,7 +1256,7 @@ virStringHasCaseSuffix(const char *str,
int suffixlen = strlen(suffix);
if (len < suffixlen)
return 0;
return false;
return STRCASEEQ(str + len - suffixlen, suffix);
}
......
......@@ -290,8 +290,8 @@ char *virStringReplace(const char *haystack,
bool virStringHasSuffix(const char *str,
const char *suffix);
int virStringHasCaseSuffix(const char *str,
const char *suffix);
bool virStringHasCaseSuffix(const char *str,
const char *suffix);
int virStringStripSuffix(char *str,
const char *suffix) ATTRIBUTE_RETURN_CHECK;
int virStringMatchesNameSuffix(const char *file,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册