mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
vmx: Convert virVMXConfigScanResultsCollector() to use STRCASESKIP()
Now that we have STRCASESKIP() there's no need to open code it. Convert virVMXConfigScanResultsCollector() so that it uses this new macro. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
059e096435
commit
c428bccc3f
@ -1321,12 +1321,13 @@ virVMXConfigScanResultsCollector(const char* name,
|
||||
void *opaque)
|
||||
{
|
||||
struct virVMXConfigScanResults *results = opaque;
|
||||
const char *suffix = NULL;
|
||||
|
||||
if (STRCASEPREFIX(name, "ethernet")) {
|
||||
if ((suffix = STRCASESKIP(name, "ethernet"))) {
|
||||
unsigned int idx;
|
||||
char *p;
|
||||
|
||||
if (virStrToLong_uip(name + 8, &p, 10, &idx) < 0 ||
|
||||
if (virStrToLong_uip(suffix, &p, 10, &idx) < 0 ||
|
||||
*p != '.') {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("failed to parse the index of the VMX key '%s'"),
|
||||
|
Loading…
Reference in New Issue
Block a user