]> Zhao Yanbai Git Server - minix.git/commitdiff
Kernel: correct a case of misleading indentation 59/1059/1
authorDavid van Moolenbroek <david@minix3.org>
Tue, 22 Oct 2013 14:44:39 +0000 (14:44 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 22 Oct 2013 14:44:39 +0000 (14:44 +0000)
Reported by Coverity.

Change-Id: If5d8a890052918f59fcc966759e4676fc4c894f0

kernel/proc.c

index 5bd307d4ec085eb1bbc3f8ec2cfe870c1b7c1305..36703a541bf5490127adf594ad9ac5895f499126 100644 (file)
@@ -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)));