r24782: Fix C++ warnings
authorVolker Lendecke <vlendec@samba.org>
Wed, 29 Aug 2007 13:56:52 +0000 (13:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:20 +0000 (12:30 -0500)
(This used to be commit f7e8df81ef9e1deadb1251e5e5959e90a4432f40)

source3/libsmb/dsgetdcname.c

index 3d8d57d157c8b52c0e2269c0b3ec32a796c2a536..90e6d49274cf999d1f0b555b63bd8c588d134f25 100644 (file)
@@ -235,7 +235,8 @@ static NTSTATUS unpack_dsdcinfo(TALLOC_CTX *mem_ctx,
                memcpy(&guid_flat.info, guid_buf, guid_len);
                smb_uuid_unpack(guid_flat, &guid);
 
-               info->domain_guid = talloc_memdup(mem_ctx, &guid, sizeof(guid));
+               info->domain_guid = (struct GUID *)talloc_memdup(
+                       mem_ctx, &guid, sizeof(guid));
                if (!info->domain_guid) {
                        goto failed;
                }
@@ -694,8 +695,8 @@ static NTSTATUS make_domain_controller_info(TALLOC_CTX *mem_ctx,
        info->domain_controller_address_type = domain_controller_address_type;
 
        if (domain_guid) {
-               info->domain_guid = talloc_memdup(mem_ctx, domain_guid,
-                                                 sizeof(*domain_guid));
+               info->domain_guid = (struct GUID *)talloc_memdup(
+                       mem_ctx, domain_guid, sizeof(*domain_guid));
                NT_STATUS_HAVE_NO_MEMORY(info->domain_guid);
        }