summaryrefslogtreecommitdiff
path: root/sysfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysfile.c')
-rw-r--r--sysfile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysfile.c b/sysfile.c
index d0de779..94f6437 100644
--- a/sysfile.c
+++ b/sysfile.c
@@ -41,11 +41,11 @@ static int
fdalloc(struct file *f)
{
int fd;
- struct proc *curproc = myproc();
+ struct proc *p = myproc();
for(fd = 0; fd < NOFILE; fd++){
- if(curproc->ofile[fd] == 0){
- curproc->ofile[fd] = f;
+ if(p->ofile[fd] == 0){
+ p->ofile[fd] = f;
return fd;
}
}
@@ -374,7 +374,7 @@ sys_chdir(void)
{
char *path;
struct inode *ip;
- struct proc *curproc = myproc();
+ struct proc *p = myproc();
begin_op();
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
@@ -388,9 +388,9 @@ sys_chdir(void)
return -1;
}
iunlock(ip);
- iput(curproc->cwd);
+ iput(p->cwd);
end_op();
- curproc->cwd = ip;
+ p->cwd = ip;
return 0;
}