Remove variable only used for an assert
When compiled with -DNDEBUG, we get warnings about set-but-unused variables. In general, it's not something we care about, but since removing those variables arguably makes the code nicer, let's just to it in this case.
This commit is contained in:
@@ -64,14 +64,10 @@ static int netdev_fill_fou_tunnel_message(NetDev *netdev, sd_netlink_message **r
|
||||
static int netdev_fou_tunnel_create(NetDev *netdev) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL;
|
||||
uint32_t serial;
|
||||
FouTunnel *t;
|
||||
int r;
|
||||
|
||||
assert(netdev);
|
||||
|
||||
t = FOU(netdev);
|
||||
|
||||
assert(t);
|
||||
assert(FOU(netdev));
|
||||
|
||||
r = netdev_fill_fou_tunnel_message(netdev, &m);
|
||||
if (r < 0)
|
||||
|
||||
@@ -430,11 +430,8 @@ static void resolve_endpoints(NetDev *netdev) {
|
||||
}
|
||||
|
||||
static int netdev_wireguard_post_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
|
||||
Wireguard *w;
|
||||
|
||||
assert(netdev);
|
||||
w = WIREGUARD(netdev);
|
||||
assert(w);
|
||||
assert(WIREGUARD(netdev));
|
||||
|
||||
(void) wireguard_set_interface(netdev);
|
||||
resolve_endpoints(netdev);
|
||||
|
||||
Reference in New Issue
Block a user