mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-23 02:27:12 +00:00
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 <john.johansen@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
parent
b47197b881
commit
1a01b5c296
@ -647,10 +647,10 @@ void DFA::dump(ostream & os)
|
|||||||
|
|
||||||
for (Partition::iterator i = states.begin(); i != states.end(); i++) {
|
for (Partition::iterator i = states.begin(); i != states.end(); i++) {
|
||||||
if ((*i)->otherwise != nonmatching)
|
if ((*i)->otherwise != nonmatching)
|
||||||
os << **i << " -> " << (*i)->otherwise << "\n";
|
os << **i << " -> " << *(*i)->otherwise << "\n";
|
||||||
for (StateTrans::iterator j = (*i)->trans.begin();
|
for (StateTrans::iterator j = (*i)->trans.begin();
|
||||||
j != (*i)->trans.end(); j++) {
|
j != (*i)->trans.end(); j++) {
|
||||||
os << **i << " -> " << j->second << ": "
|
os << **i << " -> " << *(j)->second << ": "
|
||||||
<< j->first << "\n";
|
<< j->first << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user