/* RETURNS: max free string at the root of the tree  */
static int dbInitDmapTree(struct dmap *dp)
/* RETURNS: max free string at the root of the tree  */
static int dbInitDmapTree(struct dmap *dp)
{
	struct dmaptree *tp;
	s8 *cp;
	int i;
	tp = &dp->tree;
	tp->nleafs = cpu_to_le32(LPERDMAP);
	tp->l2nleafs = cpu_to_le32(L2LPERDMAP);
	tp->leafidx = cpu_to_le32(LEAFIND);
	tp->height = cpu_to_le32(4);
	tp->budmin = BUDMIN;
	cp = tp->stree + le32_to_cpu(tp->leafidx);
	for (i = 0; i < LPERDMAP; i++)
		*cp++ = dbMaxBud((u8 *) & dp->wmap[i]);
	return (dbInitTree(tp));
}