Skip to content

Commit d3fabc1

Browse files
committed
shuf-2.8
Save a line; replace two fwrites with one fprintf.
1 parent 2d17459 commit d3fabc1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

shuf.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ static void
3838
printshuf(char *args[], int ind)
3939
{
4040

41-
fwrite(args[ind], strlen(args[ind]), 1, ofile);
42-
fwrite(&delimiter, 1, 1, ofile);
41+
fprintf(ofile, "%s%c", args[ind], delimiter);
4342
}
4443

4544
static void
@@ -184,7 +183,7 @@ static void __dead
184183
version(void)
185184
{
186185

187-
fputs("shuf 2.7\n"
186+
fputs("shuf 2.8\n"
188187
"Copyright (c) 2017-2019 Brian Callahan <[email protected]>\n"
189188
"\nPermission to use, copy, modify, and distribute this software"
190189
" for any\npurpose with or without fee is hereby granted, "

0 commit comments

Comments
 (0)