Commit 61fdcfdd authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

rpcrt4: Clarify local variables in PointerUnmarshall().

parent be430b26
...@@ -950,26 +950,25 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -950,26 +950,25 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
* whether we have to initialise it so we can use the optimisation of * whether we have to initialise it so we can use the optimisation of
* setting the pointer to the buffer, if possible, or set fMustAlloc to * setting the pointer to the buffer, if possible, or set fMustAlloc to
* TRUE. */ * TRUE. */
if (attr & FC_POINTER_DEREF) { if (attr & FC_POINTER_DEREF)
{
if (pSrcPointer && (attr & FC_ALLOCED_ON_STACK)) if (pSrcPointer && (attr & FC_ALLOCED_ON_STACK))
*pPointer = pSrcPointer; *pPointer = pSrcPointer;
else else
fMustAlloc = TRUE; fMustAlloc = TRUE;
} else {
*current_ptr = NULL;
} }
else
*pPointer = NULL;
} }
if (attr & FC_ALLOCATE_ALL_NODES) if (attr & FC_ALLOCATE_ALL_NODES)
FIXME("FC_ALLOCATE_ALL_NODES not implemented\n"); FIXME("FC_ALLOCATE_ALL_NODES not implemented\n");
if (attr & FC_POINTER_DEREF) { if (attr & FC_POINTER_DEREF) {
if (fMustAlloc) { if (fMustAlloc)
unsigned char *base_ptr_val = NdrAllocate(pStubMsg, sizeof(void *)); *pPointer = NdrAllocateZero(pStubMsg, sizeof(void *));
*pPointer = base_ptr_val;
current_ptr = (unsigned char **)base_ptr_val; current_ptr = *(unsigned char***)current_ptr;
} else
current_ptr = *(unsigned char***)current_ptr;
TRACE("deref => %p\n", current_ptr); TRACE("deref => %p\n", current_ptr);
if (!fMustAlloc && !*current_ptr) fMustAlloc = TRUE; if (!fMustAlloc && !*current_ptr) fMustAlloc = TRUE;
} }
......
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