firmware/lib/tpm2_lite/marshaling.c
/*
 * Marshaling an arbitrary blob requires its size in addition to common
 * parameter set.
 */
Marshaling an arbitrary blob requires its size in addition to common
parameter set.
Marshaling an arbitrary blob requires its size in addition to common parameter set .
static void marshal_blob(void **buffer, void *blob,
			 size_t blob_size, int *buffer_space)
{
	if (*buffer_space < blob_size) {
		*buffer_space = -1;
		return;
	}
	memcpy(*buffer, blob, blob_size);
	*buffer_space -= blob_size;
	*buffer = (void *)((uintptr_t)(*buffer) + blob_size);
}
static void marshal_blob ( void * * buffer , void * blob , size_t blob_size , int * buffer_space ) { if ( * buffer_space < blob_size ) { * buffer_space = -1 ; return ; } memcpy ( * buffer , blob , blob_size ) ; * buffer_space -= blob_size ; * buffer = ( void * ) ( ( uintptr_t ) ( * buffer ) + blob_size ) ; }
Marshaling an arbitrary blob requires its size in addition to common
 parameter set.
Marshaling an arbitrary blob requires its size in addition to common parameter set .