FreeBSD/contrib/openbsm/libbsm/bsm_audit.c
/*
 * au_close_token() returns the byte format of a token_t.  This won't
 * generally be used by applications, but is quite useful for writing test
 * tools.  Will free the token on either success or failure.
 */
au_close_token() returns the byte format of a token_t.  This won't
generally be used by applications, but is quite useful for writing test
tools.  Will free the token on either success or failure.
au_close_token () returns the byte format of a token_t . This won ' t generally be used by applications but is quite useful for writing test tools . Will free the token on either success or failure .
int
au_close_token(token_t *tok, u_char *buffer, size_t *buflen)
{
	if (tok->len > *buflen) {
		au_free_token(tok);
		errno = ENOMEM;
		return (EINVAL);
	}
	memcpy(buffer, tok->t_data, tok->len);
	*buflen = tok->len;
	au_free_token(tok);
	return (0);
}
int au_close_token ( token_t * tok , u_char * buffer , size_t * buflen ) { if ( tok -> len > * buflen ) { au_free_token ( tok ) ; errno = ENOMEM ; return ( EINVAL ) ; } memcpy ( buffer , tok -> t_data , tok -> len ) ; * buflen = tok -> len ; au_free_token ( tok ) ; return ( 0 ) ; }
au_close_token() returns the byte format of a token_t.
au_close_token () returns the byte format of a token_t .