Merge pull request #18264 from ssahani/net3

network: Use TAKE_PTR
This commit is contained in:
Luca Boccassi
2021-01-16 12:16:43 +00:00
committed by GitHub
4 changed files with 11 additions and 16 deletions
+2 -3
View File
@@ -192,8 +192,7 @@ int config_parse_address_label_prefix(const char *unit,
return 0;
}
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -236,7 +235,7 @@ int config_parse_address_label(
}
n->label = k;
n = NULL;
TAKE_PTR(n);
return 0;
}
+6 -7
View File
@@ -1455,7 +1455,7 @@ int config_parse_broadcast(
}
n->family = AF_INET;
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -1538,8 +1538,7 @@ int config_parse_address(
else
n->in_addr_peer = buffer;
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -1584,7 +1583,7 @@ int config_parse_label(
if (r < 0)
return log_oom();
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -1680,7 +1679,7 @@ int config_parse_address_flags(
SET_FLAG(n->flags, ltype, r);
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -1731,7 +1730,7 @@ int config_parse_address_scope(
}
n->scope_set = true;
n = NULL;
TAKE_PTR(n);
return 0;
}
@@ -1786,7 +1785,7 @@ int config_parse_duplicate_address_detection(
}
n->duplicate_address_detection = a;
n = NULL;
TAKE_PTR(n);
return 0;
}
+2 -4
View File
@@ -326,8 +326,7 @@ int config_parse_mdb_vlan_id(
if (r < 0)
return r;
mdb_entry = NULL;
TAKE_PTR(mdb_entry);
return 0;
}
@@ -364,7 +363,6 @@ int config_parse_mdb_group_address(
return 0;
}
mdb_entry = NULL;
TAKE_PTR(mdb_entry);
return 0;
}
+1 -2
View File
@@ -183,8 +183,7 @@ static int nexthop_add_internal(Link *link, Set **nexthops, NextHop *in, NextHop
if (ret)
*ret = nexthop;
nexthop = NULL;
TAKE_PTR(nexthop);
return 0;
}