Signed-off-by: Tony Asleson <tasle...@redhat.com> --- c_binding/lsm_mgmt.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/c_binding/lsm_mgmt.cpp b/c_binding/lsm_mgmt.cpp index 985a765..08dddd0 100644 --- a/c_binding/lsm_mgmt.cpp +++ b/c_binding/lsm_mgmt.cpp @@ -331,6 +331,13 @@ int lsm_connect_close(lsm_connect *c, lsm_flag flags) return rc; } +static Value _create_flag_param(lsm_flag flags) +{ + std::map<std::string, Value> p; + p["flags"] = Value(flags); + return Value(p); +} + int lsm_plugin_info_get(lsm_connect *c, char **desc, char **version, lsm_flag flags) { @@ -346,9 +353,8 @@ int lsm_plugin_info_get(lsm_connect *c, char **desc, } try { - std::map<std::string, Value> p; - p["flags"] = Value(flags); - Value parameters(p); + + Value parameters = _create_flag_param(flags); Value response; rc = rpc(c, "plugin_info", parameters, response); @@ -505,9 +511,8 @@ int lsm_connect_timeout_get(lsm_connect *c, uint32_t *timeout, lsm_flag flags) } try { - std::map<std::string, Value> p; - p["flags"] = Value(flags); - Value parameters(p); + + Value parameters = _create_flag_param(flags); Value response; rc = rpc(c, "time_out_get", parameters, response); -- 1.8.2.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Libstoragemgmt-devel mailing list Libstoragemgmt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel