svn commit: samba r17060 - in branches/SAMBA_3_0/source/libsmb: .

vlendec at samba.org vlendec at samba.org
Sat Jul 15 10:55:25 GMT 2006


Author: vlendec
Date: 2006-07-15 10:55:24 +0000 (Sat, 15 Jul 2006)
New Revision: 17060

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17060

Log:
Some c++ warnings
Modified:
   branches/SAMBA_3_0/source/libsmb/asn1.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/asn1.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/asn1.c	2006-07-15 09:35:21 UTC (rev 17059)
+++ branches/SAMBA_3_0/source/libsmb/asn1.c	2006-07-15 10:55:24 UTC (rev 17060)
@@ -31,7 +31,8 @@
 {
 	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_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 @@
 		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;



More information about the samba-cvs mailing list