aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/bag.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/arm/bag.c')
-rw-r--r--sim/arm/bag.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sim/arm/bag.c b/sim/arm/bag.c
index ae91ff1..a09d749 100644
--- a/sim/arm/bag.c
+++ b/sim/arm/bag.c
@@ -25,6 +25,7 @@
/********************************************************************/
#include "bag.h"
+#include <stdlib.h>
#define HASH_TABLE_SIZE 256
#define hash(x) (((x)&0xff)^(((x)>>8)&0xff)^(((x)>>16)&0xff)^(((x)>>24)&0xff))
@@ -65,8 +66,8 @@ killwholelist (Hashentry * p)
}
}
-void
-removefromlist (Hashentry ** p, long first, long second)
+static void
+removefromlist (Hashentry ** p, long first)
{
Hashentry *q;
@@ -134,8 +135,8 @@ BAG_killpair_byfirst (long first)
if (BAG_getsecond (first, &second) == NO_SUCH_PAIR)
return NO_SUCH_PAIR;
- removefromlist (&lookupbyfirst[hash (first)], first, second);
- removefromlist (&lookupbysecond[hash (second)], first, second);
+ removefromlist (&lookupbyfirst[hash (first)], first);
+ removefromlist (&lookupbysecond[hash (second)], first);
return NO_ERROR;
}
@@ -146,8 +147,8 @@ BAG_killpair_bysecond (long second)
if (BAG_getfirst (&first, second) == NO_SUCH_PAIR)
return NO_SUCH_PAIR;
- removefromlist (&lookupbyfirst[hash (first)], first, second);
- removefromlist (&lookupbysecond[hash (second)], first, second);
+ removefromlist (&lookupbyfirst[hash (first)], first);
+ removefromlist (&lookupbysecond[hash (second)], first);
return NO_ERROR;
}