Skip to content

Commit 1a61a3b

Browse files
committed
json-kafka output: remove unused check_ip method in Config
1 parent 4ccdd42 commit 1a61a3b

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/plugins/output/json-kafka/src/Config.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,6 @@ static const struct fds_xml_args args_params[] = {
126126
FDS_OPTS_END
127127
};
128128

129-
/**
130-
* \brief Check if a given string is a valid IPv4/IPv6 address
131-
* \param[in] ip_addr Address to check
132-
* \return True or false
133-
*/
134-
bool
135-
Config::check_ip(const std::string &ip_addr)
136-
{
137-
in_addr ipv4;
138-
in6_addr ipv6;
139-
140-
return (inet_pton(AF_INET, ip_addr.c_str(), &ipv4) == 1
141-
|| inet_pton(AF_INET6, ip_addr.c_str(), &ipv6) == 1);
142-
}
143-
144129
/**
145130
* \brief Check one of 2 expected options
146131
*

src/plugins/output/json-kafka/src/Config.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ struct cfg_kafka : cfg_output {
101101
/** Parsed configuration of an instance */
102102
class Config {
103103
private:
104-
bool check_ip(const std::string &ip_addr);
105104
bool check_or(const std::string &elem, const char *value, const std::string &val_true,
106105
const std::string &val_false);
107106
void check_validity();

0 commit comments

Comments
 (0)