提交 ea913d18 编写于 作者: M Martin Kletzander

util: Get rid of virStringListLen()

It does exactly the same thing as virStringListLength() and it's used in
one place only.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 d093d623
......@@ -90,7 +90,7 @@ int virPolkitCheckAuth(const char *actionid,
"start-time", "t", startTime,
"uid", "i", (int)uid,
actionid,
virStringListLen(details) / 2,
virStringListLength(details) / 2,
details,
allowInteraction,
"" /* cancellation ID */) < 0)
......
......@@ -208,20 +208,6 @@ virStringFreeListCount(char **strings,
}
size_t virStringListLen(const char **strings)
{
size_t i = 0;
if (!strings)
return 0;
while (strings[i] != NULL)
i++;
return i;
}
bool
virStringArrayHasString(char **strings, const char *needle)
{
......
......@@ -44,8 +44,6 @@ char *virStringJoin(const char **strings,
void virStringFreeList(char **strings);
void virStringFreeListCount(char **strings, size_t count);
size_t virStringListLen(const char **strings);
bool virStringArrayHasString(char **strings, const char *needle);
char *virStringGetFirstWithPrefix(char **strings, const char *prefix)
ATTRIBUTE_NONNULL(2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册