test: fix some 'dead assignment' errors
authorDaniel Mack <daniel@zonque.org>
Tue, 7 Oct 2014 12:43:18 +0000 (14:43 +0200)
committerDaniel Mack <daniel@zonque.org>
Tue, 7 Oct 2014 12:43:18 +0000 (14:43 +0200)
test/test-benchmark.c
test/test-fd.c

index 5a04be6a95b00b305ed2fa503047f436ac08cb9e..18fe68ad67f57b815c59377780f9b400ec248c89 100644 (file)
@@ -131,7 +131,6 @@ send_echo_request(struct kdbus_conn *conn, uint64_t dst_id)
                item->size = KDBUS_ITEM_HEADER_SIZE + sizeof(struct kdbus_memfd);
                item->memfd.size = sizeof(now_ns);
                item->memfd.fd = memfd;
-               item = KDBUS_ITEM_NEXT(item);
        }
 
        ret = ioctl(conn->fd, KDBUS_CMD_MSG_SEND, msg);
@@ -159,7 +158,6 @@ handle_echo_reply(struct kdbus_conn *conn, uint64_t send_ns)
        ASSERT_RETURN_VAL(ret == 0, -errno);
 
        msg = (struct kdbus_msg *)(conn->buf + recv.offset);
-       item = msg->items;
 
        KDBUS_ITEM_FOREACH(item, msg, items) {
                switch (item->type) {
index ffbad9c960708fda30dabf4df110c54891134342..77437d027674adc3afe3c048661932af1e5c545c 100644 (file)
@@ -40,7 +40,6 @@ static int send_fd(struct kdbus_conn *conn, uint64_t dst_id, int fd)
        item->type = KDBUS_ITEM_FDS;
        item->size = KDBUS_ITEM_HEADER_SIZE + sizeof(int);
        item->fds[0] = fd;
-       item = KDBUS_ITEM_NEXT(item);
 
        ret = ioctl(conn->fd, KDBUS_CMD_MSG_SEND, msg);
        if (ret) {