]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/pick_address: pass string by reference
authorKefu Chai <kchai@redhat.com>
Sat, 27 Mar 2021 02:03:02 +0000 (10:03 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 13 May 2021 01:25:32 +0000 (09:25 +0800)
to silence warnings from clang-tidy.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6d0ed81f796209f27b96811f9140b7fff16a7940)

src/common/pick_address.cc

index 4d64d3ac696718c96180008bee52dd1612792687..b7c9c63bc921346ab25dfe531897008f09e6adc1 100644 (file)
@@ -157,8 +157,8 @@ struct Observer : public md_config_obs_t {
 
 static void fill_in_one_address(CephContext *cct,
                                const struct ifaddrs *ifa,
-                               const string networks,
-                               const string interfaces,
+                               const string &networks,
+                               const string &interfaces,
                                const char *conf_var,
                                int numa_node = -1)
 {
@@ -247,8 +247,8 @@ static int fill_in_one_address(
   CephContext *cct,
   const struct ifaddrs *ifa,
   unsigned ipv,
-  const string networks,
-  const string interfaces,
+  const string &networks,
+  const string &interfaces,
   entity_addrvec_t *addrs,
   int numa_node = -1)
 {