aboutsummaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/state.c b/src/state.c
index 774828a..31eca70 100644
--- a/src/state.c
+++ b/src/state.c
@@ -36,16 +36,9 @@ static int fincmp(const void *a, const void *b)
return ((struct FingerState *)a)->id - ((struct FingerState *)b)->id;
}
-/* seander@cs.stanford.edu */
-inline unsigned abs32(int x)
-{
- int const m = x >> 31;
- return (x + m) ^ m;
-}
-
inline int abs15(int x)
{
- return 32767 & abs32(x);
+ return 32767 & (x < 0 ? -x : x);
}
/* abslute scale is assumed to fit in 15 bits */