]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Do not treat AsyncSocketState as a boolean
authorOliver Kurth <okurth@vmware.com>
Tue, 27 Aug 2019 19:55:36 +0000 (12:55 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 27 Aug 2019 19:55:36 +0000 (12:55 -0700)
AsyncSocketState is an enum.  Storing it into boolean
results in unexpected and undefined behavior.

open-vm-tools/lib/asyncsocket/asyncsocket.c

index bc75203c4db6c56e7558dcb51a0916ea82987d09..6e6fff0c1371930f0384c6250eb9e0e0d0ddff8f 100644 (file)
@@ -512,7 +512,7 @@ AsyncTCPSocketPollParams(AsyncTCPSocket *asock)
    return AsyncSocketGetPollParams(BaseSocket(asock));
 }
 
-static INLINE Bool
+static INLINE AsyncSocketState
 AsyncTCPSocketGetState(AsyncTCPSocket *asock)
 {
    return AsyncSocketGetState(BaseSocket(asock));