]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Some source code clean up in vmcisockets
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:22:41 +0000 (11:22 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:22:41 +0000 (11:22 -0700)
 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)

open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c
open-vm-tools/modules/linux/vmci/shared/vmciQueue.h

index 1203d51e0e222bd8321f96b799bae3a92a918cdc..194f63185fb8e63e367d05b8a8597944ed173c32 100644 (file)
@@ -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) {
index 000784f67f3b391979aab6ec81eed27a2e05aa03..eb2faa7cc44ccf15bb44027c914e4eb8d61f7130 100644 (file)
@@ -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.
 };