From: Oliver Kurth Date: Fri, 15 Sep 2017 18:22:41 +0000 (-0700) Subject: Some source code clean up in vmcisockets X-Git-Tag: stable-10.2.0~735 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a7dff47d34af440679a4681dced79fa2438a0ca;p=thirdparty%2Fopen-vm-tools.git Some source code clean up in vmcisockets 1. Remove a typedef that didn't def a type (newer compilers warn). 2. Rename a local that had the same name as a var in a higher scope. (note: there is no confusion or lost error case luckily here) --- diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c index 1203d51e0..194f63185 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c @@ -1654,7 +1654,7 @@ VMCIQPBroker_Detach(VMCIHandle handle, // IN isLocal = entry->qp.flags & VMCI_QPFLAG_LOCAL; if (contextId != VMCI_HOST_CONTEXT_ID) { - int result; + int result2; Bool headersMapped; ASSERT(!isLocal); @@ -1668,13 +1668,13 @@ VMCIQPBroker_Detach(VMCIHandle handle, // IN VMCI_AcquireQueueMutex(entry->produceQ, TRUE); headersMapped = entry->produceQ->qHeader || entry->consumeQ->qHeader; if (QPBROKERSTATE_HAS_MEM(entry)) { - result = VMCIHost_UnmapQueues(INVALID_VMCI_GUEST_MEM_ID, + result2 = VMCIHost_UnmapQueues(INVALID_VMCI_GUEST_MEM_ID, entry->produceQ, entry->consumeQ); - if (result < VMCI_SUCCESS) { + if (result2 < VMCI_SUCCESS) { VMCI_WARNING((LGPFX"Failed to unmap queue headers for queue pair " - "(handle=0x%x:0x%x,result=%d).\n", handle.context, - handle.resource, result)); + "(handle=0x%x:0x%x,result2=%d).\n", handle.context, + handle.resource, result2)); } VMCIHost_MarkQueuesUnavailable(entry->produceQ, entry->consumeQ); if (entry->vmciPageFiles) { diff --git a/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h b/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h index 000784f67..eb2faa7cc 100644 --- a/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h +++ b/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h @@ -110,7 +110,7 @@ typedef int VMCIMemcpyFromQueueFunc(void *dest, size_t destOffset, * Windows needs iovec for the V functions. We use an MDL for the actual * buffers, but we also have an offset that comes from WSK_BUF. */ -typedef struct iovec { +struct iovec { PMDL mdl; // List of memory descriptors. ULONG offset; // Base offset. };