summaryrefslogtreecommitdiff
path: root/endpoint.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-09-29 14:55:24 +0200
committerDaniel Mack <daniel@zonque.org>2014-09-29 14:55:24 +0200
commitafcd3f106d24f0ceab5d2f28cef260209196d968 (patch)
tree7934e6cb15f2908a388e79de3c6e5757c8b1bd60 /endpoint.c
parent86019ba6dcba90dbbd6dc9577bef22539e93b481 (diff)
downloadkdbus-bus-afcd3f106d24f0ceab5d2f28cef260209196d968.tar.gz
kdbus-bus-afcd3f106d24f0ceab5d2f28cef260209196d968.tar.bz2
kdbus-bus-afcd3f106d24f0ceab5d2f28cef260209196d968.zip
tree-wide: remove item checks
As we now have a proper incoming QA check in item.c, we can remove scattered checks from various places elsewhere. Signed-off-by: Daniel Mack <daniel@zonque.org>
Diffstat (limited to 'endpoint.c')
-rw-r--r--endpoint.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/endpoint.c b/endpoint.c
index 31261359e60..5db23d78d49 100644
--- a/endpoint.c
+++ b/endpoint.c
@@ -391,30 +391,18 @@ int kdbus_ep_make_user(const struct kdbus_cmd_make *make, char **name)
{
const struct kdbus_item *item;
const char *n = NULL;
- int ret;
KDBUS_ITEMS_FOREACH(item, make->items, KDBUS_ITEMS_SIZE(make, items)) {
- if (!KDBUS_ITEM_VALID(item, &make->items,
- KDBUS_ITEMS_SIZE(make, items)))
- return -EINVAL;
-
switch (item->type) {
case KDBUS_ITEM_MAKE_NAME:
if (n)
return -EEXIST;
- ret = kdbus_item_validate_name(item);
- if (ret < 0)
- return ret;
-
n = item->str;
continue;
}
}
- if (!KDBUS_ITEMS_END(item, make->items, KDBUS_ITEMS_SIZE(make, items)))
- return -EINVAL;
-
if (!n)
return -EBADMSG;