summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rwxr-xr-xsrc/common/tlv.c8
1 files changed, 4 insertions, 4 deletions
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;
}