summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2015-10-25 09:25:54 +0530
committerSusant Sahani <ssahani@gmail.com>2015-10-25 09:31:22 +0530
commitc2353b2f2f03b131d99491f458f439e4c65825c9 (patch)
treef777142b4458b6e44cd7604974bdfbe26539affb /src
parentcd946b9c36b77625d361c917a204beb434f41e80 (diff)
vxlan: fix assert
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-netdev-vxlan.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c
index 03a599c0d4..baf6dd6623 100644
--- a/src/network/networkd-netdev-vxlan.c
+++ b/src/network/networkd-netdev-vxlan.c
@@ -28,14 +28,16 @@
#include "missing.h"
static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
- VxLan *v = VXLAN(netdev);
+ VxLan *v;
int r;
assert(netdev);
- assert(v);
assert(link);
assert(m);
+ v = VXLAN(netdev);
+
+ assert(v);
if (v->id <= VXLAN_VID_MAX) {
r = sd_netlink_message_append_u32(m, IFLA_VXLAN_ID, v->id);
@@ -162,9 +164,12 @@ static int netdev_vxlan_verify(NetDev *netdev, const char *filename) {
}
static void vxlan_init(NetDev *netdev) {
- VxLan *v = VXLAN(netdev);
+ VxLan *v;
assert(netdev);
+
+ v = VXLAN(netdev);
+
assert(v);
v->id = VXLAN_VID_MAX + 1;