From 9ccd9be8de1b0dbd9b4ba9cc1e551e8e8f68c2f4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 30 Nov 2016 11:35:53 +0100 Subject: uniq: cleanup --- src/uniq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uniq.c b/src/uniq.c index ecf05825e..cdd014ce8 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -257,7 +257,7 @@ size_opt (char const *opt, char const *msgid) static void writeline (struct line const *line, - bool match, uintmax_t linecount, FILE *outfp, const char *outfile) + bool match, uintmax_t linecount, FILE *outfp) { if (! (linecount == 0 ? output_unique : !match ? output_first_repeated @@ -381,7 +381,7 @@ check_file (const char *infile, const char *outfile, char delimiter) if (! the_same || output_later_repeated) { - writeline (line-1, the_same, match_count, outfp, outfile); + writeline (line, the_same, match_count, outfp); if (! the_same) match_count = 0; } @@ -422,7 +422,7 @@ check_file (const char *infile, const char *outfile, char delimiter) } else { - writeline (line-1, false, match_count, outfp, outfile); + writeline (line, false, match_count, outfp); } xfclose (infp, infile); -- cgit v1.2.3-54-g00ecf