PM: a few Coverity inspired fixes
.initialize variable to prevent negative array indexing .remove dead code
This commit is contained in:
parent
ca085c16ef
commit
238a9a057b
|
@ -47,7 +47,7 @@ int do_fork()
|
|||
register struct mproc *rmp; /* pointer to parent */
|
||||
register struct mproc *rmc; /* pointer to child */
|
||||
pid_t new_pid;
|
||||
static int next_child;
|
||||
static int next_child = 0;
|
||||
int i, n = 0, s;
|
||||
endpoint_t child_ep;
|
||||
message m;
|
||||
|
@ -146,7 +146,7 @@ int do_srv_fork()
|
|||
register struct mproc *rmc; /* pointer to child */
|
||||
int s;
|
||||
pid_t new_pid;
|
||||
static int next_child;
|
||||
static int next_child = 0;
|
||||
int i, n = 0;
|
||||
endpoint_t child_ep;
|
||||
message m;
|
||||
|
|
|
@ -90,18 +90,11 @@ int main()
|
|||
|
||||
/* Check for system notifications first. Special cases. */
|
||||
if (is_ipc_notify(ipc_status)) {
|
||||
switch(who_p) {
|
||||
case CLOCK:
|
||||
if (who_p == CLOCK) {
|
||||
expire_timers(m_in.NOTIFY_TIMESTAMP);
|
||||
result = SUSPEND; /* don't reply */
|
||||
break;
|
||||
default :
|
||||
/* ignore notify() from unknown sender */
|
||||
result = SUSPEND;
|
||||
}
|
||||
|
||||
/* done, send reply and continue */
|
||||
if (result != SUSPEND) setreply(who_p, result);
|
||||
sendreply();
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue