Fix some uses of uninitialized variables.
This commit is contained in:
@@ -502,7 +502,8 @@ PUBLIC int vm_lookup(struct proc *proc, vir_bytes virtual, vir_bytes *physical,
|
||||
PUBLIC int vm_contiguous(struct proc *targetproc, u32_t vir_buf, size_t bytes)
|
||||
{
|
||||
int first = 1, r;
|
||||
u32_t prev_phys, po;
|
||||
u32_t prev_phys = 0; /* Keep lints happy. */
|
||||
u32_t po;
|
||||
|
||||
vmassert(targetproc);
|
||||
vmassert(bytes > 0);
|
||||
|
||||
@@ -1221,7 +1221,7 @@ register struct proc *rp; /* this process is now runnable */
|
||||
*/
|
||||
PRIVATE void enqueue_head(struct proc *rp)
|
||||
{
|
||||
int q; /* scheduling queue to use */
|
||||
int q = rp->p_priority; /* scheduling queue to use */
|
||||
|
||||
#if DEBUG_SCHED_CHECK
|
||||
if (rp->p_ready) minix_panic("enqueue already ready process", NO_NUM);
|
||||
@@ -1235,7 +1235,6 @@ PRIVATE void enqueue_head(struct proc *rp)
|
||||
|
||||
vmassert(q >= 0);
|
||||
|
||||
q = rp->p_priority;
|
||||
|
||||
/* Now add the process to the queue. */
|
||||
if (rdy_head[q] == NIL_PROC) { /* add to empty queue */
|
||||
|
||||
Reference in New Issue
Block a user