github-actions[bot] commented on code in PR #16617:
URL: https://github.com/apache/doris/pull/16617#discussion_r1121395013
##########
be/src/service/backend_options.cpp:
##########
@@ -101,6 +110,48 @@ bool BackendOptions::analyze_priority_cidrs() {
return true;
}
+bool BackendOptions::get_network_interfaces() {
+ if (config::network_interfaces == "") {
+ return true;
+ }
+ LOG(INFO) << "network name in conf: " << config::network_interfaces;
+
+ struct ifaddrs * ifAddrStruct = NULL;
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
struct ifaddrs * ifAddrStruct = nullptr;
```
##########
be/src/service/backend_options.cpp:
##########
@@ -101,6 +110,48 @@
return true;
}
+bool BackendOptions::get_network_interfaces() {
+ if (config::network_interfaces == "") {
+ return true;
+ }
+ LOG(INFO) << "network name in conf: " << config::network_interfaces;
+
+ struct ifaddrs * ifAddrStruct = NULL;
+ void * tmpAddrPtr = NULL;
+
+ getifaddrs(&ifAddrStruct);
+
+ std::vector<std::string> name_strs =
+ strings::Split(config::network_interfaces,
PRIORITY_CIDR_SEPARATOR);
+ bool flag = false;
+
+ for (auto& name_str : name_strs) {
+ while (ifAddrStruct!=NULL) {
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
while (ifAddrStruct!=nullptr) {
```
##########
be/src/service/backend_options.cpp:
##########
@@ -101,6 +110,48 @@
return true;
}
+bool BackendOptions::get_network_interfaces() {
+ if (config::network_interfaces == "") {
+ return true;
+ }
+ LOG(INFO) << "network name in conf: " << config::network_interfaces;
+
+ struct ifaddrs * ifAddrStruct = NULL;
+ void * tmpAddrPtr = NULL;
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
void * tmpAddrPtr = nullptr;
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]