]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nodedev: mdev: Fix build caused by symbol shadowing
authorErik Skultety <eskultet@redhat.com>
Thu, 18 May 2017 12:43:05 +0000 (14:43 +0200)
committerErik Skultety <eskultet@redhat.com>
Thu, 18 May 2017 12:56:13 +0000 (14:56 +0200)
GCC 4.6 complains about a local declaration shadowing a global symbol.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/node_device/node_device_udev.c

index 8288be1cbae93fb2ac69b51056fccf2d1bd582bb..4ecb0b18fefce0b1ab0d0414ffba37ea2ecafbf8 100644 (file)
@@ -1076,16 +1076,16 @@ udevProcessMediatedDevice(struct udev_device *dev,
     const char *uuidstr = NULL;
     int iommugrp = -1;
     char *linkpath = NULL;
-    char *realpath = NULL;
+    char *canonicalpath = NULL;
     virNodeDevCapMdevPtr data = &def->caps->data.mdev;
 
     if (virAsprintf(&linkpath, "%s/mdev_type", udev_device_get_syspath(dev)) < 0)
         goto cleanup;
 
-    if (virFileResolveLink(linkpath, &realpath) < 0)
+    if (virFileResolveLink(linkpath, &canonicalpath) < 0)
         goto cleanup;
 
-    if (VIR_STRDUP(data->type, last_component(realpath)) < 0)
+    if (VIR_STRDUP(data->type, last_component(canonicalpath)) < 0)
         goto cleanup;
 
     uuidstr = udev_device_get_sysname(dev);
@@ -1100,7 +1100,7 @@ udevProcessMediatedDevice(struct udev_device *dev,
     ret = 0;
  cleanup:
     VIR_FREE(linkpath);
-    VIR_FREE(realpath);
+    VIR_FREE(canonicalpath);
     return ret;
 }