]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/lock: a little clean up of condVar
authorVMware, Inc <>
Mon, 21 Nov 2011 23:03:35 +0000 (15:03 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 21 Nov 2011 23:03:35 +0000 (15:03 -0800)
Trivial but nice clean up of a few things.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/lock/ulCondVar.c

index 8e2bb34359c699cb34bbd0ddcffc9e1766d09e89..8569d848a1fb7b16b1ed02cc1ae81637f27d3b73 100644 (file)
@@ -732,16 +732,17 @@ void
 MXUser_DestroyCondVar(MXUserCondVar *condVar)  // IN:
 {
    if (condVar != NULL) {
-      ASSERT(condVar && (condVar->signature == MXUSER_CONDVAR_SIGNATURE));
+      ASSERT(condVar->signature == MXUSER_CONDVAR_SIGNATURE);
 
       if (Atomic_Read(&condVar->referenceCount) != 0) {
          Panic("%s: Attempted destroy on active condVar (%p; %s)\n",
                __FUNCTION__, condVar, condVar->header->name);
       }
 
+      condVar->signature = 0;  // just in case...
+
       MXUserDestroyInternal(condVar);
 
-      condVar->signature = 0;  // just in case...
       condVar->header = NULL;
       condVar->ownerLock = NULL;