Windows: no side effects from AFSDbgLogMsg calls
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:01:28 +0000 (14:01 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:44:00 +0000 (11:44 -0800)
Do not perform assignments or call side-effect resulting functions
as parameters to AFSDbgLogMsg.

Change-Id: I76eca3a82377543f4148d03af51a07886127b385
Reviewed-on: http://gerrit.openafs.org/9242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp

index 23322bb..93b92bc 100644 (file)
@@ -1030,13 +1030,15 @@ try_exit:
                     SetFlag( pCcb->Flags, CCB_FLAG_MASK_OPENED_REPARSE_POINT);
                 }
 
+                lCount = pCcb->DirectoryCB->DirOpenReferenceCount;
+
                 AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCommonCreate Count on %wZ DE %p Ccb %p Cnt %d\n",
                               &pCcb->DirectoryCB->NameInformation.FileName,
                               pCcb->DirectoryCB,
                               pCcb,
-                              lCount = pCcb->DirectoryCB->DirOpenReferenceCount);
+                              lCount);
 
                 ASSERT( lCount >= 0);