9pfs: modify variable name because of readability 53/29453/1
authorKitae Kim <kt920.kim@samsung.com>
Tue, 28 Oct 2014 05:27:51 +0000 (13:27 +0800)
committerKitae Kim <kt920.kim@samsung.com>
Tue, 28 Oct 2014 05:27:51 +0000 (13:27 +0800)
Same variable names are used between char * and V9fsState type.
Even if path is applied to only if-else statement, it could be confusing.

Change-Id: I1a3db3fd366514f48b2c4f693159b5328d04c4e4
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
hw/9pfs/virtio-9p-device.c

index e7b5a5a32cbea43b2a36c4178e33cd83976952ef..05dd75999d194be10a2ad2b4e3fd5d9ba6785d04 100644 (file)
@@ -107,11 +107,11 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
         error_setg(errp, "Virtio-9p Failed to initialize fs-driver with id:%s"
                    " and export path:%s", s->fsconf.fsdev_id, s->ctx.fs_root);
 #ifdef CONFIG_MARU
-        char *path = get_canonical_path(s->ctx.fs_root);
+        gchar *canonical_path = get_canonical_path(s->ctx.fs_root);
         maru_register_exit_msg(MARU_EXIT_UNKNOWN,
             "Virtio-9p Failed to initialize fs-driver with id: %s"
-            " and export path: %s", s->fsconf.fsdev_id, path);
-        g_free(path);
+            " and export path: %s", s->fsconf.fsdev_id, canonical_path);
+        g_free(canonical_path);
 #endif
         goto out;
     }
@@ -141,19 +141,19 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
     if (s->ops->lstat(&s->ctx, &path, &stat)) {
         error_setg(errp, "share path %s does not exist", fse->path);
 #ifdef CONFIG_MARU
-        char *path = get_canonical_path(fse->path);
+        gchar *canonical_path = get_canonical_path(fse->path);
         maru_register_exit_msg(MARU_EXIT_UNKNOWN,
-            "share path %s does not exist", path);
-        g_free(path);
+            "share path %s does not exist", canonical_path);
+        g_free(canonical_path);
 #endif
         goto out;
     } else if (!S_ISDIR(stat.st_mode)) {
         error_setg(errp, "share path %s is not a directory", fse->path);
 #ifdef CONFIG_MARU
-        char *path = get_canonical_path(fse->path);
+        gchar *canonical_path = get_canonical_path(fse->path);
         maru_register_exit_msg(MARU_EXIT_UNKNOWN,
-            "share path %s is not a directory", path);
-        g_free(path);
+            "share path %s is not a directory", canonical_path);
+        g_free(canonical_path);
 #endif
         goto out;
     }