[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Mark bug cases of addressmap_get_virtual_address as non-covered
commit 5162cf50212ed8a55ec4c6c87b60b59348233d0b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue May 1 15:28:40 2018 -0400
Mark bug cases of addressmap_get_virtual_address as non-covered
---
src/or/addressmap.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/or/addressmap.c b/src/or/addressmap.c
index 96ce27557..133d3f91e 100644
--- a/src/or/addressmap.c
+++ b/src/or/addressmap.c
@@ -959,9 +959,11 @@ addressmap_get_virtual_address(int type)
char tmp[TOR_ADDR_BUF_LEN];
tor_addr_to_str(tmp, &addr, sizeof(tmp), 0);
if (strmap_get(addressmap, tmp)) {
+ // LCOV_EXCL_START
log_warn(LD_BUG, "%s wasn't in the addressmap, but %s was.",
buf, tmp);
continue;
+ // LCOV_EXCL_STOP
}
return tor_strdup(buf);
@@ -970,8 +972,10 @@ addressmap_get_virtual_address(int type)
log_warn(LD_CONFIG, "Ran out of virtual addresses!");
return NULL;
} else {
+ // LCOV_EXCL_START
log_warn(LD_BUG, "Called with unsupported address type (%d)", type);
return NULL;
+ // LCOV_EXCL_STOP
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits