summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-25 15:28:48 -0500
committerTom Gundersen <teg@jklm.no>2015-02-26 17:31:08 -0500
commitf8a6ca1babe0afea6cd5cc8006077cbe93243b8f (patch)
tree136be9952851e4c5bd6ecd5bc4eb04060450da5e /src/libsystemd/sd-rtnl
parent7361099e4245ee31f6d70dc659d78fc533952893 (diff)
sd-rtnl: types - don't assert_return in private API
Diffstat (limited to 'src/libsystemd/sd-rtnl')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-types.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
index 2257c81bfc..40dee56e98 100644
--- a/src/libsystemd/sd-rtnl/rtnl-types.c
+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
@@ -465,8 +465,7 @@ int type_system_get_type_system(const NLTypeSystem *type_system, const NLTypeSys
if (r < 0)
return r;
- assert_return(nl_type->type == NLA_NESTED, -EINVAL);
-
+ assert(nl_type->type == NLA_NESTED);
assert(nl_type->type_system);
*ret = nl_type->type_system;
@@ -484,8 +483,7 @@ int type_system_get_type_system_union(const NLTypeSystem *type_system, const NLT
if (r < 0)
return r;
- assert_return(nl_type->type == NLA_UNION, -EINVAL);
-
+ assert(nl_type->type == NLA_UNION);
assert(nl_type->type_system_union);
*ret = nl_type->type_system_union;
@@ -497,7 +495,7 @@ int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union
int type;
assert(type_system_union);
- assert_return(type_system_union->match_type == NL_MATCH_SIBLING, -EINVAL);
+ assert(type_system_union->match_type == NL_MATCH_SIBLING);
assert(type_system_union->lookup);
assert(type_system_union->type_systems);
assert(ret);
@@ -519,9 +517,8 @@ int type_system_union_protocol_get_type_system(const NLTypeSystemUnion *type_sys
assert(type_system_union);
assert(type_system_union->type_systems);
+ assert(type_system_union->match_type == NL_MATCH_PROTOCOL);
assert(ret);
- assert_return(type_system_union->match_type == NL_MATCH_PROTOCOL, -EINVAL);
- assert_return(protocol < type_system_union->num, -EINVAL);
if (protocol >= type_system_union->num)
return -ENOTSUP;