summaryrefslogtreecommitdiff
path: root/source4/lib/util/data_blob.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 13:27:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:41 -0500
commitdccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch)
tree7c0f8e64f4ded3701818b8968171597eccd62267 /source4/lib/util/data_blob.c
parentffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff)
downloadsamba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/lib/util/data_blob.c')
-rw-r--r--source4/lib/util/data_blob.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/util/data_blob.c b/source4/lib/util/data_blob.c
index 117043f95c..b258e47bba 100644
--- a/source4/lib/util/data_blob.c
+++ b/source4/lib/util/data_blob.c
@@ -39,9 +39,9 @@ _PUBLIC_ DATA_BLOB data_blob_named(const void *p, size_t length, const char *nam
}
if (p) {
- ret.data = talloc_memdup(NULL, p, length);
+ ret.data = (uint8_t *)talloc_memdup(NULL, p, length);
} else {
- ret.data = talloc_size(NULL, length);
+ ret.data = talloc_array(NULL, uint8_t, length);
}
if (ret.data == NULL) {
ret.length = 0;
@@ -175,7 +175,7 @@ _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
_PUBLIC_ DATA_BLOB data_blob_string_const(const char *str)
{
DATA_BLOB blob;
- blob.data = discard_const(str);
+ blob.data = discard_const_p(uint8_t, str);
blob.length = strlen(str);
return blob;
}
@@ -187,7 +187,7 @@ _PUBLIC_ DATA_BLOB data_blob_string_const(const char *str)
_PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length)
{
DATA_BLOB blob;
- blob.data = discard_const(p);
+ blob.data = discard_const_p(uint8_t, p);
blob.length = length;
return blob;
}
@@ -198,7 +198,7 @@ _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length)
**/
_PUBLIC_ bool data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length)
{
- blob->data = talloc_realloc_size(mem_ctx, blob->data, length);
+ blob->data = talloc_realloc(mem_ctx, blob->data, uint8_t, length);
if (blob->data == NULL)
return false;
blob->length = length;