Do not break strict aliasing of status_t structs.
[tinc] / src / net.c
index e40caef..144655f 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -251,7 +251,7 @@ static void check_dead_connections(void)
                        } else {
                                if(c->status.remove) {
                                        logger(LOG_WARNING, _("Old connection_t for %s (%s) status %04x still lingering, deleting..."),
                        } else {
                                if(c->status.remove) {
                                        logger(LOG_WARNING, _("Old connection_t for %s (%s) status %04x still lingering, deleting..."),
-                                                  c->name, c->hostname, *(uint32_t *)&c->status);
+                                                  c->name, c->hostname, c->status.value);
                                        connection_del(c);
                                        continue;
                                }
                                        connection_del(c);
                                        continue;
                                }