]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Call _list_modules under with_val
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 20 Nov 2017 21:10:13 +0000 (16:10 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Thu, 7 Dec 2017 20:46:11 +0000 (15:46 -0500)
Avoid a temporary heap allocation.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/mgr/PyModuleRegistry.cc

index ff1d6a95185d7c5492ddcf0c0e79a6cac8f73b9a..ed32cf7604191660ae958c455a5af75572c2a42d 100644 (file)
@@ -481,6 +481,6 @@ static void _list_modules(
 
 void PyModuleRegistry::list_modules(std::set<std::string> *modules)
 {
-  _list_modules(g_conf->get_val<std::string>("mgr_module_path"), modules);
+  g_conf->with_val<std::string>("mgr_module_path",
+                               &_list_modules, modules);
 }
-