sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 9ef61c39e995116cfc9f0f0408bb083061fc7f6e
parent ea7563dc0bafcb4098768380f65f680a1705517d
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Sat,  4 Jun 2011 12:27:44 +0100

sort: fix
Diffstat:
Msort.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sort.c b/sort.c @@ -44,7 +44,7 @@ main(int argc, char *argv[]) qsort(lines, nlines, sizeof *lines, (int (*)(const void *, const void *))linecmp); for(i = 0; i < nlines; i++) - if(!uflag || i == 0 || strcmp(lines[i], lines[i-1]) == -1) + if(!uflag || i == 0 || strcmp(lines[i], lines[i-1]) != 0) fputs(lines[i], stdout); return EXIT_SUCCESS; }