aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-06-29 17:51:03 -0500
committerRob Landley <rob@landley.net>2016-06-29 17:51:03 -0500
commitcf77fe9d0ef7d37edac01d439e2b14abe5fc6d89 (patch)
tree4f1afdcc41347b422bedb66c271dd721b68fc659
parentbd4d2444cb675e41c6393ed8f76b2bf5267b2e4d (diff)
downloadtoybox-cf77fe9d0ef7d37edac01d439e2b14abe5fc6d89.tar.gz
Remove unused argument from do_lines()
-rw-r--r--toys/posix/sed.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/toys/posix/sed.c b/toys/posix/sed.c
index 7da519d0..45816c29 100644
--- a/toys/posix/sed.c
+++ b/toys/posix/sed.c
@@ -662,7 +662,7 @@ done:
// Iterate over lines in file, calling function. Function can write 0 to
// the line pointer if they want to keep it, or 1 to terminate processing,
// otherwise line is freed. Passed file descriptor is closed at the end.
-static void do_lines(int fd, char *name, void (*call)(char **pline, long len))
+static void do_lines(int fd, void (*call)(char **pline, long len))
{
FILE *fp = fd ? xfdopen(fd, "r") : stdin;
@@ -699,7 +699,7 @@ static void do_sed(int fd, char *name)
for (command = (void *)TT.pattern; command; command = command->next)
command->hit = 0;
}
- do_lines(fd, name, process_line);
+ do_lines(fd, process_line);
if (i) {
process_line(0, 0);
replace_tempfile(-1, TT.fdout, &tmp);
@@ -1063,8 +1063,7 @@ void sed_main(void)
for (al = TT.e; al; al = al->next) parse_pattern(&al->arg, strlen(al->arg));
for (al = TT.f; al; al = al->next)
- do_lines(strcmp(al->arg, "-") ? xopen(al->arg, O_RDONLY) : 0,
- al->arg, parse_pattern);
+ do_lines(strcmp(al->arg, "-") ? xopen(al->arg, O_RDONLY) : 0,parse_pattern);
parse_pattern(0, 0);
dlist_terminate(TT.pattern);
if (TT.nextlen) error_exit("no }");