Commit 3c14ae66 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

rpcrt4: Remove unneeded casts.

parent 4328d92d
......@@ -1527,8 +1527,7 @@ static void PointerFree(PMIDL_STUB_MESSAGE pStubMsg,
* BufferStart and BufferEnd won't be reset when allocating memory for
* sending the response. we don't have to check for the new buffer here as
* it won't be used a type memory, only for buffer memory */
if (Pointer >= (unsigned char *)pStubMsg->BufferStart &&
Pointer < (unsigned char *)pStubMsg->BufferEnd)
if (Pointer >= pStubMsg->BufferStart && Pointer < pStubMsg->BufferEnd)
goto notfree;
if (attr & RPC_FC_P_ONSTACK) {
......@@ -4980,7 +4979,7 @@ static ULONG get_discriminant(unsigned char fc, const unsigned char *pMemory)
case RPC_FC_CHAR:
case RPC_FC_SMALL:
case RPC_FC_USMALL:
return *(const UCHAR *)pMemory;
return *pMemory;
case RPC_FC_WCHAR:
case RPC_FC_SHORT:
case RPC_FC_USHORT:
......@@ -5800,12 +5799,12 @@ unsigned char *WINAPI NdrRangeUnmarshall(
case RPC_FC_CHAR:
case RPC_FC_SMALL:
RANGE_UNMARSHALL(UCHAR, "%d");
TRACE("value: 0x%02x\n", **(UCHAR **)ppMemory);
TRACE("value: 0x%02x\n", **ppMemory);
break;
case RPC_FC_BYTE:
case RPC_FC_USMALL:
RANGE_UNMARSHALL(CHAR, "%u");
TRACE("value: 0x%02x\n", **(UCHAR **)ppMemory);
TRACE("value: 0x%02x\n", **ppMemory);
break;
case RPC_FC_WCHAR: /* FIXME: valid? */
case RPC_FC_USHORT:
......@@ -5913,7 +5912,7 @@ static unsigned char *WINAPI NdrBaseTypeMarshall(
case RPC_FC_SMALL:
case RPC_FC_USMALL:
safe_copy_to_buffer(pStubMsg, pMemory, sizeof(UCHAR));
TRACE("value: 0x%02x\n", *(UCHAR *)pMemory);
TRACE("value: 0x%02x\n", *pMemory);
break;
case RPC_FC_WCHAR:
case RPC_FC_SHORT:
......@@ -5998,7 +5997,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
case RPC_FC_SMALL:
case RPC_FC_USMALL:
BASE_TYPE_UNMARSHALL(UCHAR);
TRACE("value: 0x%02x\n", **(UCHAR **)ppMemory);
TRACE("value: 0x%02x\n", **ppMemory);
break;
case RPC_FC_WCHAR:
case RPC_FC_SHORT:
......
......@@ -112,7 +112,7 @@ static ULONG WINAPI RpcStream_Release(LPSTREAM iface)
RpcStreamImpl *This = (RpcStreamImpl *)iface;
if (!--(This->RefCount)) {
TRACE("size=%d\n", *This->size);
This->pMsg->Buffer = (unsigned char*)This->data + *This->size;
This->pMsg->Buffer = This->data + *This->size;
HeapFree(GetProcessHeap(),0,This);
return 0;
}
......
......@@ -888,7 +888,7 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
unsigned char *pArg;
current_stack_offset = pParam->stack_offset;
pArg = (unsigned char *)(args+current_stack_offset);
pArg = args + current_stack_offset;
TRACE("param[%d]: new format\n", i);
TRACE("\tparam_attributes:"); dump_RPC_FC_PROC_PF(pParam->param_attributes); TRACE("\n");
......@@ -1063,7 +1063,7 @@ static LONG_PTR *stub_do_old_args(MIDL_STUB_MESSAGE *pStubMsg,
* if present, so adjust this */
unsigned short current_stack_offset_adjusted = current_stack_offset +
(object ? sizeof(void *) : 0);
unsigned char *pArg = (unsigned char *)(args+current_stack_offset_adjusted);
unsigned char *pArg = args + current_stack_offset_adjusted;
/* no more parameters; exit loop */
if (current_stack_offset_adjusted >= stack_size)
......
......@@ -846,7 +846,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
*Header, hdr_length,
(unsigned char *)pMsg->Buffer + buffer_length, data_length,
(RpcAuthVerifier *)auth_data,
(unsigned char *)auth_data + sizeof(RpcAuthVerifier),
auth_data + sizeof(RpcAuthVerifier),
header_auth_len - sizeof(RpcAuthVerifier));
if (status != RPC_S_OK) goto fail;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment