]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/plugin: correct output filename path
authorChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 15 Oct 2020 06:53:27 +0000 (14:53 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 15 Oct 2020 06:53:27 +0000 (14:53 +0800)
The around code use fname as output in some places.
Unify the file name variable to be fname.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/common/PluginRegistry.cc

index 4b8d6156adfe4d6908321cb516f5ad2d705cd024..dd85d64fda0ec226ad0ca07b51cf1d239d8d0ec8 100644 (file)
@@ -144,9 +144,9 @@ int PluginRegistry::load(const std::string &type,
   if (!library) {
     string err1(dlerror());
     // fall back to plugin_dir
-    std::string fname2 = cct->_conf.get_val<std::string>("plugin_dir") + "/" + PLUGIN_PREFIX +
+    fname = cct->_conf.get_val<std::string>("plugin_dir") + "/" + PLUGIN_PREFIX +
       name + PLUGIN_SUFFIX;
-    library = dlopen(fname2.c_str(), RTLD_NOW);
+    library = dlopen(fname.c_str(), RTLD_NOW);
     if (!library) {
       lderr(cct) << __func__
                 << " failed dlopen(): \""      << err1.c_str()