From 731688ecd549cf1d50932b429b2d473e90292c21 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 2 Jan 1999 19:37:56 +0000 Subject: [PATCH] (tsort): Use a single call to error instead of two to fprintf. (main): Remove `%s: ' prefix on format string. --- src/tsort.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/tsort.c b/src/tsort.c index 90f57a7c1e..418532d1ba 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")); } } -- 2.47.3