ARGMAX -> MAXARGS
This commit is contained in:
parent
fbf9103952
commit
bd39955ecc
1 changed files with 3 additions and 3 deletions
|
@ -262,12 +262,12 @@ sys_link(void)
|
||||||
return link(old, new);
|
return link(old, new);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ARGMAX 10
|
#define MAXARGS 20
|
||||||
|
|
||||||
int
|
int
|
||||||
sys_exec(void)
|
sys_exec(void)
|
||||||
{
|
{
|
||||||
char *path, *argv[ARGMAX];
|
char *path, *argv[MAXARGS];
|
||||||
int i;
|
int i;
|
||||||
uint uargv, uarg;
|
uint uargv, uarg;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ sys_exec(void)
|
||||||
return -1;
|
return -1;
|
||||||
memset(argv, 0, sizeof argv);
|
memset(argv, 0, sizeof argv);
|
||||||
for(i=0;; i++){
|
for(i=0;; i++){
|
||||||
if(i >= ARGMAX)
|
if(i >= MAXARGS)
|
||||||
return -1;
|
return -1;
|
||||||
if(fetchint(cp, uargv+4*i, (int*)&uarg) < 0)
|
if(fetchint(cp, uargv+4*i, (int*)&uarg) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue