summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1997-08-01 21:57:10 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1997-08-01 21:57:10 +0000
commit0deee7815e60e9783c73ef452dd7ca35df69c470 (patch)
treea6aa7fda49363adacc228f28cf3b867d53ca2bb2
parent769eaaba4214d08cc695463f7d2824617ff1f005 (diff)
compile clean with ALLOC_FIRST_FIT defined
-rw-r--r--sys/lib/libsa/alloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/lib/libsa/alloc.c b/sys/lib/libsa/alloc.c
index d985a1930fe..0d90622c914 100644
--- a/sys/lib/libsa/alloc.c
+++ b/sys/lib/libsa/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.4 1997/02/06 14:22:33 mickey Exp $ */
+/* $OpenBSD: alloc.c,v 1.5 1997/08/01 21:57:09 pefo Exp $ */
/* $NetBSD: alloc.c,v 1.6 1997/02/04 18:36:33 thorpej Exp $ */
/*
@@ -127,7 +127,9 @@ alloc(size)
unsigned size;
{
register struct fl **f = &freelist, **bestf = NULL;
+#ifndef ALLOC_FIRST_FIT
unsigned bestsize = 0xffffffff; /* greater than any real size */
+#endif
char *help;
int failed;
@@ -185,7 +187,9 @@ alloc(size)
/* we take the best fit */
f = bestf;
+#ifndef ALLOC_FIRST_FIT
found:
+#endif
/* remove from freelist */
help = (char*)*f;
*f = (*f)->next;