From: Brian Norris Date: Sat, 6 Oct 2012 00:07:49 +0000 (-0700) Subject: cyclegraph: fix indentation X-Git-Tag: pldi2013~99^2 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=f52ee973acad2f708ded61b7bcfffd0cbb2a90f6 cyclegraph: fix indentation --- diff --git a/cyclegraph.cc b/cyclegraph.cc index e1d5b3c..33f8cda 100644 --- a/cyclegraph.cc +++ b/cyclegraph.cc @@ -125,13 +125,13 @@ void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw) { // careful...avoid it.. hasCycles=checkReachable(rmwnode, fromnode); } - if(fromnode->addEdge(rmwnode)) + if (fromnode->addEdge(rmwnode)) rollbackvector.push_back(fromnode); } #if SUPPORT_MOD_ORDER_DUMP void CycleGraph::dumpNodes(FILE *file) { - for(unsigned int i=0;i * edges=cn->getEdges(); const ModelAction *action=cn->getAction(); @@ -139,22 +139,22 @@ void CycleGraph::dumpNodes(FILE *file) { if (cn->getRMW()!=NULL) { fprintf(file, "N%u -> N%u[style=dotted];\n", action->get_seq_number(), cn->getRMW()->getAction()->get_seq_number()); } - for(unsigned int j=0;jsize();j++) { - CycleNode *dst=(*edges)[j]; + for (unsigned int j=0;jsize();j++) { + CycleNode *dst=(*edges)[j]; const ModelAction *dstaction=dst->getAction(); - fprintf(file, "N%u -> N%u;\n", action->get_seq_number(), dstaction->get_seq_number()); - } + fprintf(file, "N%u -> N%u;\n", action->get_seq_number(), dstaction->get_seq_number()); + } } } void CycleGraph::dumpGraphToFile(const char *filename) { char buffer[200]; - sprintf(buffer, "%s.dot",filename); - FILE *file=fopen(buffer, "w"); - fprintf(file, "digraph %s {\n",filename); + sprintf(buffer, "%s.dot",filename); + FILE *file=fopen(buffer, "w"); + fprintf(file, "digraph %s {\n",filename); dumpNodes(file); - fprintf(file,"}\n"); - fclose(file); + fprintf(file,"}\n"); + fclose(file); } #endif