From be95b61c87c8007a43f23f295428f60095230b30 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Thu, 22 Aug 2013 03:38:01 +0100 Subject: [PATCH] Fix rlocs_find_two_ipv4 --- pass-1/rlocs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pass-1/rlocs.c b/pass-1/rlocs.c index b6ffff5..9d6938f 100644 --- a/pass-1/rlocs.c +++ b/pass-1/rlocs.c @@ -458,17 +458,14 @@ int rlocs_find_two_ipv4( struct rloc **d_rloc_ptr, struct in_addr *d_rloc_addr ) { - struct rloc *s_rloc = *s_rloc_ptr; - struct rloc *d_rloc = *d_rloc_ptr; - char addr_str[128]; - if ( ( s_rloc = rloc_find_by_address( reg, s_rloc_addr, NULL ) ) == NULL ) { + if ( ( *s_rloc_ptr = rloc_find_by_address( reg, s_rloc_addr, NULL ) ) == NULL ) { inet_ntop( AF_INET, s_rloc_addr, &addr_str[0], 128 ); debug( "Couldn't find source rloc (%s) in DB", addr_str ); return 0; } - if ( ( d_rloc = rloc_find_by_address( reg, d_rloc_addr, NULL ) ) == NULL ) { + if ( ( *d_rloc_ptr = rloc_find_by_address( reg, d_rloc_addr, NULL ) ) == NULL ) { inet_ntop( AF_INET, d_rloc_addr, &addr_str[0], 128 ); debug( "Couldn't find destination rloc (%s) in DB", addr_str ); return 0;