register struct mproc *rmp; /* pointer to parent */
register struct mproc *rmc; /* pointer to child */
pid_t new_pid;
- static int next_child = 0;
+ static unsigned int next_child = 0;
int i, n = 0, s;
endpoint_t child_ep;
message m;
} while((mproc[next_child].mp_flags & IN_USE) && n <= NR_PROCS);
if(n > NR_PROCS)
panic("do_fork can't find child slot");
- if(next_child < 0 || next_child >= NR_PROCS
- || (mproc[next_child].mp_flags & IN_USE))
+ if(next_child >= NR_PROCS || (mproc[next_child].mp_flags & IN_USE))
panic("do_fork finds wrong child slot: %d", next_child);
/* Memory part of the forking. */
register struct mproc *rmc; /* pointer to child */
int s;
pid_t new_pid;
- static int next_child = 0;
+ static unsigned int next_child = 0;
int i, n = 0;
endpoint_t child_ep;
message m;
} while((mproc[next_child].mp_flags & IN_USE) && n <= NR_PROCS);
if(n > NR_PROCS)
panic("do_fork can't find child slot");
- if(next_child < 0 || next_child >= NR_PROCS
- || (mproc[next_child].mp_flags & IN_USE))
+ if(next_child >= NR_PROCS || (mproc[next_child].mp_flags & IN_USE))
panic("do_fork finds wrong child slot: %d", next_child);
if((s=vm_fork(rmp->mp_endpoint, next_child, &child_ep)) != OK) {