From: Brian Norris Date: Thu, 19 Apr 2012 07:10:17 +0000 (-0700) Subject: tree: don't use 'NULL' for a thread ID X-Git-Tag: pldi2013~545 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=10eea33164e9f7c08b25d45b1157d213aca908ec;p=model-checker.git tree: don't use 'NULL' for a thread ID --- diff --git a/tree.cc b/tree.cc index f42202e..c52c184 100644 --- a/tree.cc +++ b/tree.cc @@ -43,7 +43,7 @@ int TreeNode::setBacktrack(tree_t id) tree_t TreeNode::getNextBacktrack() { if (backtrack.empty()) - return NULL; + return TREE_T_NONE; return *backtrack.begin(); } diff --git a/tree.h b/tree.h index 766aacd..6d37038 100644 --- a/tree.h +++ b/tree.h @@ -3,6 +3,7 @@ #include "threads.h" typedef thread_id_t tree_t; +#define TREE_T_NONE -1 /* * An n-ary tree