summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-12-28 00:03:24 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-12-28 00:03:24 +0000
commit1f3dfe48c1ff05cda14a410016925ac9b84a5610 (patch)
treef763dce98b6c522446e831d32096190a1b491c55 /distrib
parent7b8c2ecb7ba38a4641f8b18228b1e9ba6c27dd0e (diff)
Correctly handle envp pointer in main() -- henric@aimnet.com
Diffstat (limited to 'distrib')
-rw-r--r--distrib/crunch/crunchgen/crunched_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/crunch/crunchgen/crunched_main.c b/distrib/crunch/crunchgen/crunched_main.c
index 3e893960d3f..a4aa819b009 100644
--- a/distrib/crunch/crunchgen/crunched_main.c
+++ b/distrib/crunch/crunchgen/crunched_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunched_main.c,v 1.2 2000/03/01 22:10:03 todd Exp $ */
+/* $OpenBSD: crunched_main.c,v 1.3 2001/12/28 00:03:23 angelos Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -43,7 +43,7 @@ struct stub {
extern struct stub entry_points[];
-int main(int argc, char **argv)
+int main(int argc, char **argv, char **envp)
{
char *slash, *basename;
struct stub *ep;
@@ -58,7 +58,7 @@ int main(int argc, char **argv)
if(!strcmp(basename, ep->name)) break;
if(ep->name)
- return ep->f(argc, argv);
+ return ep->f(argc, argv, envp);
else {
fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename);
crunched_usage();
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
}
-int crunched_main(int argc, char **argv)
+int crunched_main(int argc, char **argv, char **envp)
{
struct stub *ep;
int columns, len;
@@ -74,7 +74,7 @@ int crunched_main(int argc, char **argv)
if(argc <= 1)
crunched_usage();
- return main(--argc, ++argv);
+ return main(--argc, ++argv, envp);
}