blob: a21decdd138ce250200894979d6e019e80822ad3 (
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
34
|
if (!prs_align(ps)) goto fail;
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;
}
|