diff options
-rw-r--r-- | src/tsort.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tsort.c b/src/tsort.c index 90f57a7c1..418532d1b 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -435,17 +435,14 @@ tsort (const char *file) assert (n_strings >= 0); if (n_strings > 0) { - if (have_read_stdin) - fprintf (stderr, _("%s: input contains a loop:\n"), program_name); - else - fprintf (stderr, _("%s: %s: input contains a loop:\n"), - program_name, file); + error (0, 0, _("%s: input contains a loop:\n"), + (have_read_stdin ? "-" : file)); /* Print out loop. */ walk_tree (root, detect_loop); /* Should not happen. */ - error (EXIT_FAILURE, 0, _("%s: could not find loop")); + error (EXIT_FAILURE, 0, _("could not find loop")); } } |