Skip to content

Commit

Permalink
Although printf("%.*s", INT_MAX, s) works fine on ubuntu 12.04, it br…
Browse files Browse the repository at this point in the history
…oke since.
  • Loading branch information
landley committed Feb 10, 2016
1 parent 1e77f70 commit 93e27d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toys/posix/grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void outline(char *line, char dash, char *name, long lcount, long bcount,
if (!line || (lcount && (toys.optflags&FLAG_n)))
printf("%ld%c", lcount, line ? dash : TT.outdelim);
if (bcount && (toys.optflags&FLAG_b)) printf("%ld%c", bcount-1, dash);
if (line) xprintf("%.*s%c", trim ? trim : INT_MAX, line, TT.outdelim);
if (line) xprintf("%.*s%c", trim ? trim : INT_MAX/2, line, TT.outdelim);
}

// Show matches in one file
Expand Down

0 comments on commit 93e27d0

Please sign in to comment.