Review at https://gerrit.osmocom.org/3942
cosmetic: ipa.c: use msgb_dequeue() instead of code dup Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 --- M src/input/ipa.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/42/3942/1 diff --git a/src/input/ipa.c b/src/input/ipa.c index ce155ce..b7863b8 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -364,14 +364,12 @@ int ret; LOGP(DLINP, LOGL_DEBUG, "sending data\n"); + msg = msgb_dequeue(&conn->tx_queue); - if (llist_empty(&conn->tx_queue)) { + if (!msg) { ofd->when &= ~BSC_FD_WRITE; return; } - lh = conn->tx_queue.next; - llist_del(lh); - msg = llist_entry(lh, struct msgb, list); ret = send(conn->ofd.fd, msg->data, msg->len, 0); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/3942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>