summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-10 17:17:42 +0000
committerrsc <rsc>2007-08-10 17:17:42 +0000
commitdca5b5ca2e3687f27ebf589fe3855966932840d8 (patch)
tree79be03b3d6f950eb8ceb105449674aaa614bd17e /main.c
parent6861140a667cd7219cf9bc1e051faadfc8c46c6f (diff)
downloadxv6-labs-dca5b5ca2e3687f27ebf589fe3855966932840d8.tar.gz
xv6-labs-dca5b5ca2e3687f27ebf589fe3855966932840d8.tar.bz2
xv6-labs-dca5b5ca2e3687f27ebf589fe3855966932840d8.zip
avoid assignments in declarations
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 76e9eeb..10a448e 100644
--- a/main.c
+++ b/main.c
@@ -118,13 +118,13 @@ mpmain(void)
void
process0(void)
{
- struct proc *p0 = &proc[0];
- struct proc *p1;
extern struct spinlock proc_table_lock;
+ struct proc *p0, *p1;
struct trapframe tf;
release(&proc_table_lock);
+ p0 = &proc[0];
p0->cwd = iget(rootdev, 1);
iunlock(p0->cwd);