rpcrt4: Assign to structs instead of using memcpy.
This commit is contained in:
parent
fd6ae97486
commit
db6a901bf4
|
@ -183,7 +183,7 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
|
|||
che->magic = NDR_CONTEXT_HANDLE_MAGIC;
|
||||
RpcBindingCopy(hBinding, &che->handle);
|
||||
list_add_tail(&context_handle_list, &che->entry);
|
||||
memcpy(&che->wire_data, chi, sizeof *chi);
|
||||
che->wire_data = *chi;
|
||||
}
|
||||
|
||||
*CContext = che;
|
||||
|
|
|
@ -227,7 +227,7 @@ RPC_STATUS RPCRT4_ResolveBinding(RpcBinding* Binding, LPCSTR Endpoint)
|
|||
RPC_STATUS RPCRT4_SetBindingObject(RpcBinding* Binding, const UUID* ObjectUuid)
|
||||
{
|
||||
TRACE("(*RpcBinding == ^%p, UUID == %s)\n", Binding, debugstr_guid(ObjectUuid));
|
||||
if (ObjectUuid) memcpy(&Binding->ObjectUuid, ObjectUuid, sizeof(UUID));
|
||||
if (ObjectUuid) Binding->ObjectUuid = *ObjectUuid;
|
||||
else UuidCreateNil(&Binding->ObjectUuid);
|
||||
return RPC_S_OK;
|
||||
}
|
||||
|
@ -691,10 +691,10 @@ RPC_STATUS WINAPI RpcBindingInqObject( RPC_BINDING_HANDLE Binding, UUID* ObjectU
|
|||
RpcBinding* bind = (RpcBinding*)Binding;
|
||||
|
||||
TRACE("(%p,%p) = %s\n", Binding, ObjectUuid, debugstr_guid(&bind->ObjectUuid));
|
||||
memcpy(ObjectUuid, &bind->ObjectUuid, sizeof(UUID));
|
||||
*ObjectUuid = bind->ObjectUuid;
|
||||
return RPC_S_OK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RpcBindingSetObject (RPCRT4.@)
|
||||
*/
|
||||
|
|
|
@ -196,8 +196,8 @@ RpcPktHdr *RPCRT4_BuildBindHeader(unsigned long DataRepresentation,
|
|||
header->bind.assoc_gid = AssocGroupId;
|
||||
header->bind.num_elements = 1;
|
||||
header->bind.num_syntaxes = 1;
|
||||
memcpy(&header->bind.abstract, AbstractId, sizeof(RPC_SYNTAX_IDENTIFIER));
|
||||
memcpy(&header->bind.transfer, TransferId, sizeof(RPC_SYNTAX_IDENTIFIER));
|
||||
header->bind.abstract = *AbstractId;
|
||||
header->bind.transfer = *TransferId;
|
||||
|
||||
return header;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ RpcPktHdr *RPCRT4_BuildBindAckHeader(unsigned long DataRepresentation,
|
|||
results->results[0].result = Result;
|
||||
results->results[0].reason = Reason;
|
||||
transfer_id = (RPC_SYNTAX_IDENTIFIER*)(results + 1);
|
||||
memcpy(transfer_id, TransferId, sizeof(RPC_SYNTAX_IDENTIFIER));
|
||||
*transfer_id = *TransferId;
|
||||
|
||||
return header;
|
||||
}
|
||||
|
|
|
@ -845,7 +845,7 @@ RPC_STATUS WINAPI RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid,
|
|||
sif = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerInterface));
|
||||
sif->If = If;
|
||||
if (MgrTypeUuid) {
|
||||
memcpy(&sif->MgrTypeUuid, MgrTypeUuid, sizeof(UUID));
|
||||
sif->MgrTypeUuid = *MgrTypeUuid;
|
||||
sif->MgrEpv = MgrEpv;
|
||||
} else {
|
||||
memset(&sif->MgrTypeUuid, 0, sizeof(UUID));
|
||||
|
@ -977,8 +977,8 @@ RPC_STATUS WINAPI RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid )
|
|||
return RPC_S_ALREADY_REGISTERED;
|
||||
/* ... otherwise create a new one and add it in. */
|
||||
map = HeapAlloc(GetProcessHeap(), 0, sizeof(RpcObjTypeMap));
|
||||
memcpy(&map->Object, ObjUuid, sizeof(UUID));
|
||||
memcpy(&map->Type, TypeUuid, sizeof(UUID));
|
||||
map->Object = *ObjUuid;
|
||||
map->Type = *TypeUuid;
|
||||
map->next = NULL;
|
||||
if (prev)
|
||||
prev->next = map; /* prev is the last map in the linklist */
|
||||
|
|
Loading…
Reference in New Issue