Skip to content
Snippets Groups Projects
Commit 6f2b626d authored by rsc's avatar rsc
Browse files

remove non-idiomatic increment/decrement

parent 51716a86
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ real_cons_putc(int c)
} else {
c |= 0x0700; // black on white
crt[ind] = c;
ind += 1;
ind++;
}
if((ind / 80) >= 24){
......@@ -100,10 +100,8 @@ printint(int xx, int base, int sgn)
if(neg)
buf[i++] = '-';
while(i > 0){
i -= 1;
while(--i >= 0)
real_cons_putc(buf[i]);
}
}
/*
......
......@@ -104,6 +104,6 @@ fd_incref(struct fd *fd)
acquire(&fd_table_lock);
if(fd->count < 1 || fd->type == FD_CLOSED)
panic("fd_reference");
fd->count += 1;
fd->count++;
release(&fd_table_lock);
}
......@@ -71,13 +71,8 @@ trap(struct Trapframe *tf)
if(cpus[cpu()].nlock)
panic("timer interrupt while holding a lock");
if(cp){
#if 1
if((read_eflags() & FL_IF) == 0)
panic("timer interrupt but interrupts now disabled");
#else
cpus[cpu()].clis += 1;
sti();
#endif
if(cp->killed)
proc_exit();
if(cp->state == RUNNING)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment