mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
ba35f793bf
(This used to be commit f6353bf12212aeb30e0daff52904bf2f71ec141d)
35 lines
672 B
Smarty
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;
|
|
}
|
|
|
|
|