Skip to content

Commit 2808217

Browse files
committed
Inline shufecho() into the one place where it is called.
1 parent e8eddca commit 2808217

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

shuf.c

+5-12
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ shuf(int argn, char *args[])
6969
printshuf(args, i);
7070
}
7171

72-
static void
73-
shufecho(int argn, char *args[])
74-
{
75-
76-
if (rflag)
77-
randomshuf(argn, args);
78-
else
79-
shuf(argn, args);
80-
}
81-
8272
static void
8373
shuffile(const char *input, int argn, size_t inputlen)
8474
{
@@ -194,7 +184,7 @@ static void
194184
version(void)
195185
{
196186

197-
fputs("shuf 2.3\n"
187+
fputs("shuf 2.4\n"
198188
"Copyright (c) 2017-2019 Brian Callahan <[email protected]>\n"
199189
"\nPermission to use, copy, modify, and distribute this software"
200190
" for any\npurpose with or without fee is hereby granted, "
@@ -300,7 +290,10 @@ main(int argc, char *argv[])
300290
if (argc == 0)
301291
goto out;
302292
repledge(oflag);
303-
shufecho(argc, argv);
293+
if (rflag)
294+
randomshuf(argc, argv);
295+
else
296+
shuf(argc, argv);
304297
goto out;
305298
}
306299

0 commit comments

Comments
 (0)