1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00
Andrew Tridgell ba35f793bf align at the end of every structure parser
(This used to be commit f6353bf12212aeb30e0daff52904bf2f71ec141d)
2000-05-15 09:57:19 +00:00

35 lines
672 B
Smarty

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;
}