summaryrefslogtreecommitdiff
path: root/src/network/networkd-routing-policy-rule.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2021-01-15 18:07:28 +0100
committerSusant Sahani <ssahani@vmware.com>2021-01-16 23:04:07 +0100
commit8eeffefbf0c46b2648725b25b28de078f78b1c14 (patch)
tree205bf5f916f8d87d2e49abbd30eb4c290701ef75 /src/network/networkd-routing-policy-rule.c
parentfd9d7de176d6b990610397c0df15bdbcd6b6714f (diff)
downloadsystemd-8eeffefbf0c46b2648725b25b28de078f78b1c14.tar.gz
network: routing-policy-rule - TAKE_PTR
Diffstat (limited to 'src/network/networkd-routing-policy-rule.c')
-rw-r--r--src/network/networkd-routing-policy-rule.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c
index 722e415830..e179ffbb9e 100644
--- a/src/network/networkd-routing-policy-rule.c
+++ b/src/network/networkd-routing-policy-rule.c
@@ -1067,8 +1067,7 @@ int config_parse_routing_policy_rule_tos(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1104,8 +1103,7 @@ int config_parse_routing_policy_rule_priority(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1141,8 +1139,7 @@ int config_parse_routing_policy_rule_table(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1178,8 +1175,7 @@ int config_parse_routing_policy_rule_fwmark_mask(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1228,8 +1224,7 @@ int config_parse_routing_policy_rule_prefix(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1274,8 +1269,7 @@ int config_parse_routing_policy_rule_device(
return log_oom();
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1319,8 +1313,7 @@ int config_parse_routing_policy_rule_port_range(
n->dport.end = high;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1358,8 +1351,7 @@ int config_parse_routing_policy_rule_ip_protocol(
n->ipproto = r;
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1397,8 +1389,7 @@ int config_parse_routing_policy_rule_invert(
n->invert_rule = r;
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1437,8 +1428,8 @@ int config_parse_routing_policy_rule_family(
}
n->address_family = a;
- n = NULL;
+ TAKE_PTR(n);
return 0;
}
@@ -1483,8 +1474,8 @@ int config_parse_routing_policy_rule_uid_range(
n->uid_range.start = start;
n->uid_range.end = end;
- n = NULL;
+ TAKE_PTR(n);
return 0;
}
@@ -1524,8 +1515,7 @@ int config_parse_routing_policy_rule_suppress_prefixlen(
return 0;
}
- n = NULL;
-
+ TAKE_PTR(n);
return 0;
}
@@ -1563,8 +1553,8 @@ int config_parse_routing_policy_rule_type(
}
n->type = (uint8_t) t;
- n = NULL;
+ TAKE_PTR(n);
return 0;
}