Skip to content

Commit

Permalink
bug237: Don't compute incorrect argc for timedrun
Browse files Browse the repository at this point in the history
Since spawn_and_wait doesn't use argc anyway, might as well just not
send a value in.
  • Loading branch information
dustin authored and dormando committed Jan 12, 2012
1 parent 595572c commit 016a87c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions timedrun.c
Expand Up @@ -67,13 +67,11 @@ static int wait_for_process(pid_t pid)
return rv;
}

static int spawn_and_wait(int argc, char **argv)
static int spawn_and_wait(char **argv)
{
int rv = EX_SOFTWARE;
pid_t pid = fork();

assert(argc > 1);

switch (pid) {
case -1:
perror("fork");
Expand All @@ -100,5 +98,5 @@ int main(int argc, char **argv)

alarm(naptime);

return spawn_and_wait(argc+2, argv+2);
return spawn_and_wait(argv+2);
}

0 comments on commit 016a87c

Please sign in to comment.