summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Trangez <ikke@nicolast.be>2014-04-23 20:37:51 +0200
committerAustin Seipp <austin@well-typed.com>2014-04-27 08:05:29 -0500
commit27337de5999e43807131acb290447e4ab8aa334c (patch)
treeaf6461047a4ff24c5db9262513e943b5d1ef2e02
parent07fb613bf599aa9237b1ef73861706b447173d38 (diff)
downloadhaskell-27337de5999e43807131acb290447e4ab8aa334c.tar.gz
Check correct variable for NULL
Issue discovered by Coverity scan, CID 43163. This should fix CID 43172 as a side-effect as well. Signed-off-by: Austin Seipp <austin@well-typed.com> (cherry picked from commit 6ed7123dcc24c343a1ece85c7aa72ac1c34e6aff)
-rw-r--r--rts/Hpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Hpc.c b/rts/Hpc.c
index c4ff8d3be1..47d1acddbc 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -151,7 +151,7 @@ readTix(void) {
ws();
lookup = lookupHashTable(moduleHash, (StgWord)tmpModule->modName);
- if (tmpModule == NULL) {
+ if (lookup == NULL) {
debugTrace(DEBUG_hpc,"readTix: new HpcModuleInfo for %s",
tmpModule->modName);
insertHashTable(moduleHash, (StgWord)tmpModule->modName, tmpModule);