Perform some minor fixups

This commit is contained in:
Justine Tunney 2021-03-16 22:19:51 -07:00
parent ca88ce5026
commit 4e93750afd
9 changed files with 24 additions and 50 deletions

View file

@ -17,7 +17,6 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/bits/bits.h"
#include "libc/bits/safemacros.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/internal.h"
#include "libc/calls/struct/sysinfo.h"
@ -41,8 +40,8 @@ int sysinfo(struct sysinfo *info) {
} else {
rc = sys_sysinfo_nt(info);
}
info->procs = max(1, info->procs);
info->mem_unit = max(1, info->mem_unit);
info->totalram = max((8 * 1024 * 1024) / info->mem_unit, info->totalram);
info->procs = MAX(1, info->procs);
info->mem_unit = MAX(1, info->mem_unit);
info->totalram = MAX((8 * 1024 * 1024) / info->mem_unit, info->totalram);
return rc;
}