examples/power: remove double copy of FIFO path
authorLukasz Krakowiak <lukaszx.krakowiak@intel.com>
Tue, 16 Apr 2019 10:20:39 +0000 (12:20 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Jul 2019 20:42:45 +0000 (22:42 +0200)
Removed doubled created fifo path string for channel info.

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
examples/vm_power_manager/channel_manager.c

index 0846817..0f5f9e2 100644 (file)
@@ -362,8 +362,6 @@ setup_host_channel_info(struct channel_info **chan_info_dptr,
        chan_info->status = CHANNEL_MGR_CHANNEL_DISCONNECTED;
        chan_info->type = CHANNEL_TYPE_JSON;
 
-       fifo_path(chan_info->channel_path, sizeof(chan_info->channel_path));
-
        if (open_host_channel(chan_info) < 0) {
                RTE_LOG(ERR, CHANNEL_MANAGER, "Could not open host channel: "
                                "'%s'\n",
@@ -563,8 +561,8 @@ add_host_channel(void)
                                "channel '%s'\n", socket_path);
                return 0;
        }
-       strlcpy(chan_info->channel_path, socket_path,
-               sizeof(chan_info->channel_path));
+       rte_strlcpy(chan_info->channel_path, socket_path, UNIX_PATH_MAX);
+
        if (setup_host_channel_info(&chan_info, 0) < 0) {
                rte_free(chan_info);
                return 0;