DragonFlyBSD: Indentation and formatting fixes

This commit is contained in:
Benny Baumann 2021-05-21 22:42:00 +02:00
parent ee9e7edbc1
commit 2c8353e7cf
1 changed files with 22 additions and 20 deletions

View File

@ -295,6 +295,7 @@ static inline void DragonFlyBSDProcessList_scanJails(DragonFlyBSDProcessList* df
if (sysctlbyname("jail.list", NULL, &len, NULL, 0) == -1) {
CRT_fatalError("initial sysctlbyname / jail.list failed");
}
retry:
if (len == 0)
return;
@ -312,11 +313,13 @@ retry:
if (dfpl->jails) {
Hashtable_delete(dfpl->jails);
}
dfpl->jails = Hashtable_new(20, true);
curpos = jls;
while (curpos) {
int jailid;
char* str_hostname;
nextpos = strchr(curpos, '\n');
if (nextpos) {
*nextpos++ = 0;
@ -346,6 +349,7 @@ static char* DragonFlyBSDProcessList_readJailName(DragonFlyBSDProcessList* dfpl,
} else {
jname = xStrdup("-");
}
return jname;
}
@ -510,23 +514,21 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
default: proc->state = '?';
}
if (kproc->kp_flags & P_SWAPPEDOUT) {
if (kproc->kp_flags & P_SWAPPEDOUT)
proc->state = 'W';
}
if (kproc->kp_flags & P_TRACED) {
if (kproc->kp_flags & P_TRACED)
proc->state = 'T';
}
if (kproc->kp_flags & P_JAILED) {
if (kproc->kp_flags & P_JAILED)
proc->state = 'J';
}
if (Process_isKernelThread(dfp)) {
if (Process_isKernelThread(dfp))
super->kernelThreads++;
}
super->totalTasks++;
if (proc->state == 'R')
super->runningTasks++;
proc->updated = true;
}
}