libsys: resolve Coverity warnings
This commit is contained in:
parent
49aed1ad97
commit
ebc85e54c4
5 changed files with 7 additions and 8 deletions
|
@ -84,6 +84,4 @@ double getidle(void)
|
|||
|
||||
return rfp;
|
||||
}
|
||||
|
||||
running = !running;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ void procentry (char *name)
|
|||
}
|
||||
/* Set values for new slot. */
|
||||
cprof_slot = &cprof_tbl[control.slots_used++];
|
||||
strcpy(cprof_slot->cpath, cpath);
|
||||
strlcpy(cprof_slot->cpath, cpath, sizeof(cprof_slot->cpath));
|
||||
cprof_slot->calls = 1;
|
||||
|
||||
/* Update index. */
|
||||
|
|
|
@ -21,7 +21,6 @@ int sched_inherit(endpoint_t scheduler_e,
|
|||
assert(_ENDPOINT_P(scheduler_e) >= 0);
|
||||
assert(_ENDPOINT_P(schedulee_e) >= 0);
|
||||
assert(_ENDPOINT_P(parent_e) >= 0);
|
||||
assert(maxprio >= 0);
|
||||
assert(maxprio < NR_SCHED_QUEUES);
|
||||
assert(newscheduler_e);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void sef_startup()
|
|||
&priv_flags);
|
||||
if ( r != OK) {
|
||||
sef_self_endpoint = SELF;
|
||||
sprintf(sef_self_name, "%s", "Unknown");
|
||||
strlcpy(sef_self_name, "Unknown", sizeof(sef_self_name));
|
||||
}
|
||||
sef_self_priv_flags = priv_flags;
|
||||
old_endpoint = NONE;
|
||||
|
@ -302,8 +302,9 @@ char* sef_debug_header(void)
|
|||
{
|
||||
/* Build and return a SEF debug header. */
|
||||
sef_debug_refresh_params();
|
||||
sprintf(sef_debug_header_buff, "%s: time = %ds %06dus",
|
||||
sef_self_name, (int) sef_debug_time_sec, (int) sef_debug_time_us);
|
||||
snprintf(sef_debug_header_buff, sizeof(sef_debug_header_buff),
|
||||
"%s: time = %ds %06dus", sef_self_name, (int) sef_debug_time_sec,
|
||||
(int) sef_debug_time_us);
|
||||
|
||||
return sef_debug_header_buff;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ void ser_putc(char c)
|
|||
thr= COM1_THR;
|
||||
for (i= 0; i<10000; i++)
|
||||
{
|
||||
sys_inb(lsr, &b);
|
||||
if (sys_inb(lsr, &b) != OK)
|
||||
return;
|
||||
if (b & LSR_THRE)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue