Skip to content

Commit

Permalink
We don't have to add our own null pointer, there's already one on argv.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwern committed Jul 7, 2009
1 parent 69bf20e commit ff1cfed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bin/perl5i.c.PL
Expand Up @@ -30,15 +30,10 @@ int main (int argc, char* argv[]) {
perl_args[0] = argv[0];
perl_args[1] = "-Mperl5i";

for( i = 1; i < argc; i++ ) {
for( i = 1; i <= argc; i++ ) {
perl_args[i+1] = argv[i];
}

/* Argument array to execv must
* terminated by a null pointer
*/
perl_args[argc+1] = (char *)NULL;

return execv( perl_cmd, perl_args );
}
END

0 comments on commit ff1cfed

Please sign in to comment.