Kernel: resolve Coverity warnings

This commit is contained in:
David van Moolenbroek
2012-08-15 11:12:11 +00:00
parent 0b5c2a058c
commit 8e116b71a1
5 changed files with 7 additions and 13 deletions
+1 -6
View File
@@ -90,7 +90,6 @@ int runqueues_ok_cpu(unsigned cpu)
}
}
l = 0;
for (xp = BEG_PROC_ADDR; xp < END_PROC_ADDR; ++xp) {
if(!proc_ptr_ok(xp)) {
printf("xp bogus pointer in proc table\n");
@@ -101,10 +100,6 @@ int runqueues_ok_cpu(unsigned cpu)
if(proc_is_runnable(xp) && !xp->p_found) {
printf("sched error: ready proc %d not on queue\n", xp->p_nr);
return 0;
if (l++ > MAX_LOOP) {
printf("loop in debug.c?\n");
return 0;
}
}
}
@@ -145,7 +140,7 @@ rtsflagstr(const u32_t flags)
static char str[100];
str[0] = '\0';
#define FLAG(n) if(flags & n) { strcat(str, #n " "); }
#define FLAG(n) if(flags & n) { strlcat(str, #n " ", sizeof(str)); }
FLAG(RTS_SLOT_FREE);
FLAG(RTS_PROC_STOP);