diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-04-19 12:06:34 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-04-19 19:07:06 +0000 |
commit | c8f7e16b57ed02dd5b4ccba7ec16ac37ae37beb6 (patch) | |
tree | b9f7a5e0451550684ebbf089fefe1b685bbe68e4 /epan/addr_resolv.c | |
parent | c03f13bda8be7db381eb52a090af5871706dfb20 (diff) |
Some routine name changes.
"get_addr_name()" -> "ep_address_to_display()", to 1) indicate that it
returns a string with ephemeral scope and 2) indicate that it maps an
address to a "displayable" form - a name if possible, an address string
if not.
"se_get_addr_name()" -> "get_addr_name()", to indicate that its strings
have the same scope as "get_ether_name()", "get_hostname()", and
"get_hostname6()".
Change-Id: If2ab776395c7a4a163fef031d92b7757b5d23838
Reviewed-on: https://code.wireshark.org/review/1216
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r-- | epan/addr_resolv.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index bdc7c9650f..5a4673b320 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -2988,7 +2988,7 @@ get_sctp_port(guint port) } /* get_sctp_port */ const gchar * -get_addr_name(const address *addr) +ep_address_to_display(const address *addr) { const gchar *result; @@ -3008,15 +3008,8 @@ get_addr_name(const address *addr) return ep_address_to_str(addr); } -/* - * XXX - we should rename get_addr_name() to ep_addr_name(), to indicate - * that the scope of the string it returns may be as short-lived as - * an ep_allocated string (although it may be longer-lived), and - * rename this to get_addr_name(), as its strings have the same scope - * as the get_XXX_name() routines it calls. - */ const gchar * -se_get_addr_name(const address *addr) +get_addr_name(const address *addr) { guint32 ip4_addr; struct e_in6_addr ip6_addr; @@ -3049,7 +3042,7 @@ se_get_addr_name(const address *addr) void get_addr_name_buf(const address *addr, gchar *buf, gsize size) { - const gchar *result = get_addr_name(addr); + const gchar *result = ep_address_to_display(addr); g_strlcpy(buf, result, size); } /* get_addr_name_buf */ |