summaryrefslogtreecommitdiff
path: root/source3/aparser/templates/fn_end.tpl
blob: b5c36fff35462de8172e068b6d856bdb440d947e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

	return True;

fail:
        ZERO_STRUCTP(il);
	return False;
} /* @FUNCNAME@ */

/*******************************************************************
parse a @STRUCTNAME@ structure
********************************************************************/
BOOL @FUNCNAME@_alloc(char *desc, @STRUCTNAME@ **q_u,
             prs_struct *ps, int depth)
{
	@STRUCTNAME@ *il;
	BOOL ret;
	
	if (!UNMARSHALLING(ps)) return False;

	il=(@STRUCTNAME@ *)malloc(sizeof(@STRUCTNAME@));
	if (il == NULL) return False;
	ZERO_STRUCTP(il);

	ret = @FUNCNAME@(desc, il, ps, depth);
	if (!ret) {
	   free(il);
	   return False;
	}
	*q_u = il;
	return True;
}