diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-20 13:17:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-20 13:17:59 -0400 |
commit | 1d7beea2ab513c31845abb61d79fb5960b038e4b (patch) | |
tree | f0cd33eaf25b77678cc12e933c3e43bf42f1a664 /src/common/address.c | |
parent | 2a6d12c7adafe679882195b15d6245f2888d12ee (diff) | |
parent | 718252b253049f84fefa14e212cf560838e6607c (diff) | |
download | tor-1d7beea2ab513c31845abb61d79fb5960b038e4b.tar.gz tor-1d7beea2ab513c31845abb61d79fb5960b038e4b.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/address.c b/src/common/address.c index d0c2d5e15c..26a59e923e 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -958,8 +958,10 @@ fmt_addr(const tor_addr_t *addr) { static char buf[TOR_ADDR_BUF_LEN]; if (!addr) return "<null>"; - tor_addr_to_str(buf, addr, sizeof(buf), 0); - return buf; + if (tor_addr_to_str(buf, addr, sizeof(buf), 0)) + return buf; + else + return "???"; } /** Like fmt_addr(), but takes <b>addr</b> as a host-order IPv4 |