/* get_lpt_node_type - return type (and node number) of a node in a buffer.  */
static int get_lpt_node_type(const struct ubifs_info *c, uint8_t *buf, int *node_num)
/* get_lpt_node_type - return type (and node number) of a node in a buffer.  */
static int get_lpt_node_type(const struct ubifs_info *c, uint8_t *buf, int *node_num)
{
	uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
	int pos = 0, node_type;
	node_type = ubifs_unpack_bits(&addr, &pos, UBIFS_LPT_TYPE_BITS);
	*node_num = ubifs_unpack_bits(&addr, &pos, c->pcnt_bits);
	return node_type;
}