From: David van Moolenbroek Date: Tue, 22 Oct 2013 14:44:39 +0000 (+0000) Subject: Kernel: correct a case of misleading indentation X-Git-Tag: v3.3.0~737 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=90680501352db8fc3f8d4656de962944d5e5de71;p=minix.git Kernel: correct a case of misleading indentation Reported by Coverity. Change-Id: If5d8a890052918f59fcc966759e4676fc4c894f0 --- diff --git a/kernel/proc.c b/kernel/proc.c index 5bd307d4e..36703a541 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -1616,12 +1616,12 @@ static void enqueue_head(struct proc *rp) /* Now add the process to the queue. */ if (!rdy_head[q]) { /* add to empty queue */ - rdy_head[q] = rdy_tail[q] = rp; /* create a new queue */ - rp->p_nextready = NULL; /* mark new end */ + rdy_head[q] = rdy_tail[q] = rp; /* create a new queue */ + rp->p_nextready = NULL; /* mark new end */ + } else { /* add to head of queue */ + rp->p_nextready = rdy_head[q]; /* chain head of queue */ + rdy_head[q] = rp; /* set new queue head */ } - else /* add to head of queue */ - rp->p_nextready = rdy_head[q]; /* chain head of queue */ - rdy_head[q] = rp; /* set new queue head */ /* Make note of when this process was added to queue */ read_tsc_64(&(get_cpulocal_var(proc_ptr->p_accounting.enter_queue)));