From 1a01b5c29629c29d244cd02886fcddfb3b0ce95f Mon Sep 17 00:00:00 2001 From: John Johansen Date: Fri, 9 Mar 2012 04:14:34 -0800 Subject: [PATCH] Fix/cleanup the dfa dump routines output to provide state label Fix the transitions states output so that they output the state label instead of the state address. That is {1} -> 0x10831a0: / now becomes {1} -> {2}: / Signed-off-by: John Johansen Acked-By: Steve Beattie --- parser/libapparmor_re/hfa.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/libapparmor_re/hfa.cc b/parser/libapparmor_re/hfa.cc index eafe3c2dc..b18be0846 100644 --- a/parser/libapparmor_re/hfa.cc +++ b/parser/libapparmor_re/hfa.cc @@ -647,10 +647,10 @@ void DFA::dump(ostream & os) for (Partition::iterator i = states.begin(); i != states.end(); i++) { if ((*i)->otherwise != nonmatching) - os << **i << " -> " << (*i)->otherwise << "\n"; + os << **i << " -> " << *(*i)->otherwise << "\n"; for (StateTrans::iterator j = (*i)->trans.begin(); j != (*i)->trans.end(); j++) { - os << **i << " -> " << j->second << ": " + os << **i << " -> " << *(j)->second << ": " << j->first << "\n"; } }