remove duplicates in tlv.h and add get_uint_8

This commit is contained in:
merlokk 2019-02-20 18:36:01 +02:00
commit fe79b0e411
2 changed files with 7 additions and 2 deletions

View file

@ -582,3 +582,9 @@ bool tlv_get_int(const struct tlv *etlv, int *value)
}
return false;
}
bool tlvdb_get_uint8(struct tlvdb *tlvRoot, tlv_tag_t tag, uint8_t *value)
{
const struct tlv *tlvelm = tlvdb_get(tlvRoot, tag, NULL);
return tlv_get_uint8(tlvelm, value);
}

View file

@ -65,7 +65,6 @@ bool tlv_equal(const struct tlv *a, const struct tlv *b);
bool tlv_get_uint8(const struct tlv *etlv, uint8_t *value);
bool tlv_get_int(const struct tlv *etlv, int *value);
bool tlv_get_uint8(const struct tlv *etlv, uint8_t *value);
bool tlv_get_int(const struct tlv *etlv, int *value);
bool tlvdb_get_uint8(struct tlvdb *tlvRoot, tlv_tag_t tag, uint8_t *value);
#endif