diff options
author | Jim Meyering <jim@meyering.net> | 1999-01-02 19:37:56 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-01-02 19:37:56 +0000 |
commit | 731688ecd549cf1d50932b429b2d473e90292c21 (patch) | |
tree | 4d1351b0431fdd331fd165e21f22819cb509fcfd | |
parent | 7004c53ab4c551adad61f9a733289ffc3330defe (diff) | |
download | coreutils-731688ecd549cf1d50932b429b2d473e90292c21.tar.xz |
(tsort): Use a single call to error instead of two to fprintf.
(main): Remove `%s: ' prefix on format string.
-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")); } } |