From: Jim Meyering Date: Sun, 7 Oct 2007 16:16:00 +0000 (+0200) Subject: Use puts, rather than printf ("%s\n". Slightly cleaner. X-Git-Tag: v6.9.89~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abdb73fc1139e5e6c74e67be417e9a6714d3ec53;p=thirdparty%2Fcoreutils.git Use puts, rather than printf ("%s\n". Slightly cleaner. * src/tsort.c (tsort): ...and more efficient. --- diff --git a/ChangeLog b/ChangeLog index 099fd02ef8..74457fffe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-10-07 Jim Meyering + Use puts, rather than printf ("%s\n". Slightly cleaner. + * src/tsort.c (tsort): ...and more efficient. + Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix. * bootstrap.conf (gnulib_modules): Add vasprintf-posix. Suggestion from Bruno Haible. diff --git a/src/tsort.c b/src/tsort.c index 7d413cc03b..8ebacb4d8c 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -1,5 +1,5 @@ /* tsort - topological sort. - Copyright (C) 1998-2005 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -486,7 +486,7 @@ tsort (const char *file) struct successor *p = head->top; /* T5. Output front of queue. */ - printf ("%s\n", head->str); + puts (head->str); head->str = NULL; /* Avoid printing the same string twice. */ n_strings--;