From 7c5042af3c606081d3f4b917ef667f6ed05780a8 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Sun, 9 Jun 2019 23:08:36 +0300 Subject: hook various previously unused modules together. This now allows us to send messages to the device and such. Yay? Yay. Signed-off-by: Gediminas Jakutis --- src/common/tlv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/tlv.c b/src/common/tlv.c index 84b20ca..0e800ca 100755 --- a/src/common/tlv.c +++ b/src/common/tlv.c @@ -45,17 +45,17 @@ int tlv_get(char *in, struct tlv *tlv, char **saveptr) memcpy(&head, in, sizeof(head)); head = ntoh_tlvh(&head); + tlv->head = head; if (head.type == INVALID || !head.size) { ret = NONEWDATA; - goto out; + } else { + tlv->data = in + sizeof(head); } - tlv->head = head; - tlv->data = in + sizeof(head); if (saveptr) { *saveptr = in + sizeof(head) + head.size; } -out: + return ret; } -- cgit v1.2.3