Perform some minor code cleanup

This commit is contained in:
Justine Tunney
2021-04-06 12:46:52 -07:00
parent 6c16f208b5
commit 59575f7e80
4 changed files with 25 additions and 35 deletions

View File

@ -16,13 +16,13 @@
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
│ PERFORMANCE OF THIS SOFTWARE. │
╚─────────────────────────────────────────────────────────────────────────────*/
#include "libc/bits/safemacros.internal.h"
#include "libc/calls/calls.h"
#include "libc/fmt/conv.h"
#include "libc/macros.internal.h"
#include "libc/sysv/consts/prio.h"
static int clamp(int p) {
return max(-NZERO, min(NZERO - 1, p));
return MAX(-NZERO, MIN(NZERO - 1, p));
}
/**
@ -34,7 +34,7 @@ static int clamp(int p) {
*/
int nice(int delta) {
int p;
if (abs(delta) >= NZERO * 2) {
if (ABS(delta) >= NZERO * 2) {
p = delta;
} else {
delta = clamp(delta);