When compiled with -DDEBUG, only print the old value of a PMC in a

debugging message if the flag PMC_F_OLDVALUE was specified in the
PMC_OP_RW request being acted upon.  This should fix Coverity bug
CID 671.

Found by:	Coverity Prevent
MFC after:	3 weeks
This commit is contained in:
Joseph Koshy 2006-03-16 16:32:56 +00:00
parent c97afd4d2f
commit 9d0a2685e4

View File

@ -3293,7 +3293,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
if (prw.pm_flags & PMC_F_NEWVALUE)
PMCDBG(PMC,OPS,2, "rw id=%d new %jx -> old %jx",
ri, prw.pm_value, oldvalue);
else
else if (prw.pm_flags & PMC_F_OLDVALUE)
PMCDBG(PMC,OPS,2, "rw id=%d -> old %jx", ri, oldvalue);
#endif