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