diff options
author | imarom <imarom@cisco.com> | 2016-12-01 14:07:27 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-01 14:07:27 +0200 |
commit | c420d1fd8c17118f2ccaee4b05b81ec3dd515fa6 (patch) | |
tree | f8a345a69c3e96a1c0b183720e343f3ed821843b /src/common | |
parent | e5ee9a836a1ec8e4f3d7bf36b821f593c2e4c5b6 (diff) |
refactor RX core
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/common')
-rwxr-xr-x | src/common/basic_utils.cpp | 6 | ||||
-rwxr-xr-x | src/common/basic_utils.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/basic_utils.cpp b/src/common/basic_utils.cpp index dfd3b183..fded49ec 100755 --- a/src/common/basic_utils.cpp +++ b/src/common/basic_utils.cpp @@ -273,18 +273,18 @@ void utl_set_coredump_size(long size, bool map_huge_pages) { fclose(fp); } -uint32_t utl_ipv4_to_uint32(const char *ipv4_str, uint32_t &ipv4_num) { +bool utl_ipv4_to_uint32(const char *ipv4_str, uint32_t &ipv4_num) { uint32_t tmp; int rc = my_inet_pton4(ipv4_str, (unsigned char *)&tmp); if (!rc) { - return (0); + return false; } ipv4_num = PAL_NTOHL(tmp); - return (1); + return true; } std::string utl_uint32_to_ipv4(uint32_t ipv4_addr) { diff --git a/src/common/basic_utils.h b/src/common/basic_utils.h index c30457d7..36f9db85 100755 --- a/src/common/basic_utils.h +++ b/src/common/basic_utils.h @@ -101,7 +101,7 @@ std::string utl_generate_random_str(unsigned int &seed, int len); */ void utl_set_coredump_size(long size, bool map_huge_pages = false); -uint32_t utl_ipv4_to_uint32(const char *ipv4_str, uint32_t &ipv4_num); +bool utl_ipv4_to_uint32(const char *ipv4_str, uint32_t &ipv4_num); std::string utl_uint32_to_ipv4(uint32_t ipv4_addr); #endif |