mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
bd734bbbce
commit
cf3c525a45
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user