Commit 1bd4bb13 authored by sevenuz's avatar sevenuz
Browse files

lint errors fixed

parent 2e4a02f1
Loading
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -333,13 +333,13 @@ host_t
RapidHashDistributor::locate_data(const string& path, const chunkid_t& chnk_id,
                                  const int num_copy) const {
    std::string hash_buf = path + ::to_string(chnk_id);
    return (rapidhash(hash_buf.data(), hash_buf.length()) + num_copy) % hosts_size_;
    return (rapidhash(hash_buf.data(), hash_buf.length()) + num_copy) %
           hosts_size_;
}

host_t
RapidHashDistributor::locate_data(const string& path, const chunkid_t& chnk_id,
                                   unsigned int hosts_size,
                                   const int num_copy) {
                                  unsigned int hosts_size, const int num_copy) {
    if(hosts_size_ != hosts_size) {
        hosts_size_ = hosts_size;
        all_hosts_ = std::vector<unsigned int>(hosts_size);
@@ -347,7 +347,8 @@ RapidHashDistributor::locate_data(const string& path, const chunkid_t& chnk_id,
    }

    std::string hash_buf = path + ::to_string(chnk_id);
    return (rapidhash(hash_buf.data(), hash_buf.length()) + num_copy) % hosts_size_;
    return (rapidhash(hash_buf.data(), hash_buf.length()) + num_copy) %
           hosts_size_;
}

host_t
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
  SPDX-License-Identifier: MIT
*/

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <fmt/format.h>
#include <common/rpc/distributor.hpp>
#include <fstream>