[PATCH] jobs: drop unused node parameter in makejob()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CC: dash@xxxxxxxxxxxxxxx
CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
---
 src/eval.c | 6 +++---
 src/jobs.c | 6 +++---
 src/jobs.h | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index fa43b68..978a174 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -494,7 +494,7 @@ evalsubshell(union node *n, int flags)
 		forkreset();
 		goto nofork;
 	}
-	jp = makejob(n, 1);
+	jp = makejob(1);
 	if (forkshell(jp, n, backgnd) == 0) {
 		flags |= EV_EXIT;
 		if (backgnd)
@@ -571,7 +571,7 @@ evalpipe(union node *n, int flags)
 		pipelen++;
 	flags |= EV_EXIT;
 	INTOFF;
-	jp = makejob(n, pipelen);
+	jp = makejob(pipelen);
 	prevfd = -1;
 	for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
 		prehash(lp->n);
@@ -637,7 +637,7 @@ evalbackcmd(union node *n, struct backcmd *result)
 
 	if (pipe(pip) < 0)
 		sh_error("Pipe call failed");
-	jp = makejob(n, 1);
+	jp = makejob(1);
 	if (forkshell(jp, n, FORK_NOJOB) == 0) {
 		FORCEINTON;
 		close(pip[0]);
diff --git a/src/jobs.c b/src/jobs.c
index f3b9ffc..5a0886e 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -749,7 +749,7 @@ err:
  */
 
 struct job *
-makejob(union node *node, int nprocs)
+makejob(int nprocs)
 {
 	int i;
 	struct job *jp;
@@ -780,7 +780,7 @@ makejob(union node *node, int nprocs)
 	if (nprocs > 1) {
 		jp->ps = ckmalloc(nprocs * sizeof (struct procstat));
 	}
-	TRACE(("makejob(0x%lx, %d) returns %%%d\n", (long)node, nprocs,
+	TRACE(("makejob(%d) returns %%%d\n", nprocs,
 	    jobno(jp)));
 	return jp;
 }
@@ -963,7 +963,7 @@ struct job *vforkexec(union node *n, char **argv, const char *path, int idx)
 	struct job *jp;
 	int pid;
 
-	jp = makejob(n, 1);
+	jp = makejob(1);
 
 	sigblockall(NULL);
 	vforked++;
diff --git a/src/jobs.h b/src/jobs.h
index 6ac6c56..2832d64 100644
--- a/src/jobs.h
+++ b/src/jobs.h
@@ -102,7 +102,7 @@ int jobscmd(int, char **);
 struct output;
 void showjobs(struct output *, int);
 int waitcmd(int, char **);
-struct job *makejob(union node *, int);
+struct job *makejob(int);
 int forkshell(struct job *, union node *, int);
 struct job *vforkexec(union node *n, char **argv, const char *path, int idx);
 int waitforjob(struct job *);
-- 
2.37.2




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux