/* get_lpt_node_len - return the length of a node based on its type.  */
static int get_lpt_node_len(const struct ubifs_info *c, int node_type)
/* get_lpt_node_len - return the length of a node based on its type.  */
static int get_lpt_node_len(const struct ubifs_info *c, int node_type)
{
	switch (node_type) {
	case UBIFS_LPT_NNODE:
		return c->nnode_sz;
	case UBIFS_LPT_PNODE:
		return c->pnode_sz;
	case UBIFS_LPT_LTAB:
		return c->ltab_sz;
	case UBIFS_LPT_LSAVE:
		return c->lsave_sz;
	}
	return 0;
}