1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-27 08:23:49 +03:00

r2653: - data_blob() and data_blob_talloc() now get automatic names

- talloc_strdup() and related functions get automatic names
This commit is contained in:
Andrew Tridgell
2004-09-26 06:41:59 +00:00
committed by Gerald (Jerry) Carter
parent 4aba6e7101
commit 0cf427d14f
3 changed files with 20 additions and 11 deletions

View File

@@ -25,7 +25,7 @@
construct a data blob, must be freed with data_blob_free()
you can pass NULL for p and get a blank data blob
*******************************************************************/
DATA_BLOB data_blob(const void *p, size_t length)
DATA_BLOB data_blob_named(const void *p, size_t length, const char *name)
{
DATA_BLOB ret;
@@ -43,6 +43,7 @@ DATA_BLOB data_blob(const void *p, size_t length)
ret.length = 0;
return ret;
}
talloc_set_name_const(ret.data, name);
ret.length = length;
return ret;
}