提交 cf3c525a 编写于 作者: P Peter Krempa

util: string: Remove the 'virString' type

We don't need it as there's a separate macro for auto-freeing of string
lists.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 bd734bbb
......@@ -24,8 +24,6 @@
# include "internal.h"
# include "viralloc.h"
typedef char *virString;
char **virStringSplitCount(const char *string,
const char *delim,
size_t max_tokens,
......@@ -317,6 +315,4 @@ int virStringParsePort(const char *str,
# define VIR_AUTOSTRINGLIST \
__attribute__((cleanup(virStringListAutoFree))) char **
VIR_DEFINE_AUTOPTR_FUNC(virString, virStringListFree);
#endif /* LIBVIRT_VIRSTRING_H */
......@@ -474,14 +474,14 @@ static int
xenParsePCIList(virConfPtr conf, virDomainDefPtr def)
{
VIR_AUTOSTRINGLIST pcis = NULL;
virString *entries = NULL;
char **entries = NULL;
int rc;
if ((rc = virConfGetValueStringList(conf, "pci", false, &pcis)) <= 0)
return xenHandleConfGetValueStringListErrors(rc);
for (entries = pcis; *entries; entries++) {
virString entry = *entries;
char *entry = *entries;
virDomainHostdevDefPtr hostdev;
if (!(hostdev = xenParsePCI(entry)))
......@@ -789,7 +789,7 @@ xenParseCharDev(virConfPtr conf, virDomainDefPtr def, const char *nativeFormat)
/* Try to get the list of values to support multiple serial ports */
if ((rc = virConfGetValueStringList(conf, "serial", false, &serials)) == 1) {
virString *entries;
char **entries;
int portnum = -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XM)) {
......@@ -799,7 +799,7 @@ xenParseCharDev(virConfPtr conf, virDomainDefPtr def, const char *nativeFormat)
}
for (entries = serials; *entries; entries++) {
virString port = *entries;
char *port = *entries;
portnum++;
if (STREQ(port, "none"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册