aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-10-25 12:51:33 -0700
committerGuy Harris <guy@alum.mit.edu>2017-10-25 19:52:05 +0000
commit14080744dba2c170b6bc718aef1c89e1e175eefe (patch)
treeb256094d1bbe7f5a0ae2e70622c0acbbbd58b950
parent6537c996a62ac0540fb21e4b0462119422dd6ad6 (diff)
Get rid of a no-longer-needed variable.
We don't need a temporary IPv4 address variable in get_host_ipaddr(), we can just use the pointer we've been handed. Change-Id: Id7cbd0c14b2eeb3efde5a556f3414bd635411908 Reviewed-on: https://code.wireshark.org/review/24056 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/addr_resolv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index b49dc78..358f21f 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -3120,7 +3120,6 @@ c_ares_ghi_cb(void *arg, int status, int timeouts _U_, struct hostent *hp) {
gboolean
get_host_ipaddr(const char *host, guint32 *addrp)
{
- guint32 ipaddr;
#ifdef HAVE_C_ARES
struct timeval tv = { 0, GHI_TIMEOUT }, *tvp;
int nfds;
@@ -3138,7 +3137,7 @@ get_host_ipaddr(const char *host, guint32 *addrp)
* that's *only* supposed to be an IPv4 address, and where it
* *shouldn't* translate host names?
*/
- if (!ws_inet_pton4(host, &ipaddr)) {
+ if (!ws_inet_pton4(host, addrp)) {
/* It's not a valid dotted-quad IP address; is it a valid
* host name?
@@ -3188,7 +3187,6 @@ get_host_ipaddr(const char *host, guint32 *addrp)
return FALSE;
}
- *addrp = ipaddr;
return TRUE;
}