You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "torwig (via GitHub)" <gi...@apache.org> on 2023/04/17 15:23:49 UTC
[GitHub] [incubator-kvrocks] torwig commented on a diff in pull request #1392: feat: implement local IP address retrieval function
torwig commented on code in PR #1392:
URL: https://github.com/apache/incubator-kvrocks/pull/1392#discussion_r1168894659
##########
src/cluster/cluster.cc:
##########
@@ -157,7 +159,34 @@ Status Cluster::SetSlot(int slot, const std::string &node_id, int64_t new_versio
return Status::OK();
}
+// Get all local IP addresses.
+std::vector<std::string> getLocalIPAddresses() {
+ std::vector<std::string> ipAddresses;
Review Comment:
Hi @zevin02 , thank you for your contribution.
Please, rename the function's local variables like `ip_addresses`.
Also, you can use the `nullptr` keyword instead of `NULL` and simplify checks like `if (pointer != NULL)` by using `if (pointer)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org