sbase

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

commit b2e73936bfc9cb6400825437cbf848393180f561
parent 695940d50c33820a5821f9519c14c9f7443a3960
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat Mar  7 14:04:04 +0100

uniq: dont use count format if empty

Diffstat:
uniq.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/uniq.c b/uniq.c @@ -49,7 +49,8 @@ uniqline(FILE *ofp, char *l) if (prevline) { if ((prevlinecount == 1 && !dflag) || (prevlinecount != 1 && !uflag)) { - fprintf(ofp, countfmt, prevlinecount); + if (*countfmt) + fprintf(ofp, countfmt, prevlinecount); fputs(prevline, ofp); } free(prevline);