diff options
Diffstat (limited to 'usr.bin/tsort/tsort.c')
-rw-r--r-- | usr.bin/tsort/tsort.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 591ad16..fca46e9 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tsort.c,v 1.7 1997/03/11 14:48:14 peter Exp $ + * $Id: tsort.c,v 1.8 1997/03/29 04:33:15 imp Exp $ */ #ifndef lint @@ -340,7 +340,7 @@ tsort() err(1, NULL); } for (n = graph; n != NULL; n = n->n_next) - if (!(n->n_flags & NF_ACYCLIC)) + if (!(n->n_flags & NF_ACYCLIC)) { if ((cnt = find_cycle(n, n, 0, 0))) { if (!quiet) { warnx("cycle in data"); @@ -356,6 +356,7 @@ tsort() n->n_flags |= NF_ACYCLIC; clear_cycle(); } + } if (n == NULL) errx(1, "internal error -- could not find cycle"); |