mirror of
https://github.com/samba-team/samba.git
synced 2025-02-21 01:59:07 +03:00
r11593: added a data_blob_realloc() function
This commit is contained in:
parent
5c7f3fef3e
commit
e04262d391
@ -182,6 +182,17 @@ DATA_BLOB data_blob_const(const void *p, size_t length)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
realloc a data_blob
|
||||
*/
|
||||
NTSTATUS data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length)
|
||||
{
|
||||
blob->data = talloc_realloc_size(mem_ctx, blob->data, length);
|
||||
NT_STATUS_HAVE_NO_MEMORY(blob->data);
|
||||
blob->length = length;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
append some data to a data blob
|
||||
*/
|
||||
@ -195,3 +206,4 @@ NTSTATUS data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
|
||||
blob->length += length;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user