tnf_int32_t tnf_get_int32(tnf_datum_t datum) { CHECK_SCALAR(datum); /* LINTED pointer cast may result in improper alignment */ return (_GET_INT32(DATUM_TNF(datum), DATUM_VAL(datum))); }
struct taginfo * _tnf_record_info(TNF *tnf, tnf_ref32_t *record) { tnf_ref32_t ref32; tnf_ref16_t tag16; tnf_abs16_t index; struct taginfo *info; ref32 = _GET_INT32(tnf, record); index = 0; if (TNF_REF32_IS_PAIR(ref32)) { tag16 = TNF_REF32_TAG16(ref32); if (TNF_TAG16_IS_ABS(tag16)) index = TAG_INDEX(tag16); } if (index) { if ((info = tnf->tag_directory[index]) != NULL) return (info); else { /* not in directory yet */ info = _tnf_get_info(tnf, _tnf_get_tag(tnf, record)); /* enter into tag directory */ return ((tnf->tag_directory[index] = info)); } } /* default: not referenced via index */ return (_tnf_get_info(tnf, _tnf_get_tag(tnf, record))); }