summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-15 10:55:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:22 -0500
commit5fe140babcbec90ddcbd9a6517c3f5e76844a9e9 (patch)
treeb16697e1c0ddf25b4b2a8963272adaf933811048 /source3/libsmb
parent4f33673b41437959dc0c37768805bd176472e4ac (diff)
downloadsamba-5fe140babcbec90ddcbd9a6517c3f5e76844a9e9.tar.gz
samba-5fe140babcbec90ddcbd9a6517c3f5e76844a9e9.tar.bz2
samba-5fe140babcbec90ddcbd9a6517c3f5e76844a9e9.zip
r17060: Some c++ warnings
(This used to be commit 2e7afa9e19b117d7a8ce1238c1b9b80ececec729)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/asn1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index 544ee78d40..dd22051ae7 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/libsmb/asn1.c
@@ -31,7 +31,8 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
{
if (data->has_error) return False;
if (data->length < data->ofs+len) {
- data->data = SMB_REALLOC(data->data, data->ofs+len);
+ data->data = SMB_REALLOC_ARRAY(data->data, unsigned char,
+ data->ofs+len);
if (!data->data) {
data->has_error = True;
return False;
@@ -213,7 +214,7 @@ BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
{
ZERO_STRUCTP(data);
- data->data = memdup(blob.data, blob.length);
+ data->data = (unsigned char *)memdup(blob.data, blob.length);
if (!data->data) {
data->has_error = True;
return False;
@@ -405,7 +406,7 @@ BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
data->has_error = True;
return False;
}
- str = SMB_MALLOC(len+1);
+ str = SMB_MALLOC_ARRAY(char, len+1);
if (!str) {
data->has_error = True;
return False;