made sure everything's thread safe
Pretty much everything already was, but I tweaked a few things to make
sure they stay that way and added various comments about that fact. Also
cleaned up a few things along the way and removed SafeMessageBuilder
because it wasn't.
diff --git a/aos/linux_code/configuration.cc b/aos/linux_code/configuration.cc
index 55fff84..e4d5d80 100644
--- a/aos/linux_code/configuration.cc
+++ b/aos/linux_code/configuration.cc
@@ -44,6 +44,7 @@
unique_c_ptr<ifaddrs, freeifaddrs> addrs_deleter(addrs);
for (; addrs != nullptr; addrs = addrs->ifa_next) {
+ // ifa_addr tends to be nullptr on CAN interfaces.
if (addrs->ifa_addr != nullptr && addrs->ifa_addr->sa_family == AF_INET) {
if (strcmp(kLinuxNetInterface, addrs->ifa_name) == 0) {
static const in_addr r =