aboutsummaryrefslogtreecommitdiff
path: root/gas/sb.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2006-05-02 03:39:04 +0000
committerBen Elliston <bje@au.ibm.com>2006-05-02 03:39:04 +0000
commit58633d9add68cf75d76828f7c6c8cee76715b24b (patch)
treef56a72e7b2df98a3bf0a5a9fe933a33c340fc38d /gas/sb.c
parente460dd0d29973affa0b660495c1426c16d797e4c (diff)
downloadgdb-58633d9add68cf75d76828f7c6c8cee76715b24b.zip
gdb-58633d9add68cf75d76828f7c6c8cee76715b24b.tar.gz
gdb-58633d9add68cf75d76828f7c6c8cee76715b24b.tar.bz2
* sb.h (sb_list_vector): Move to sb.c.
* sb.c (free_list): Use type of sb_list_vector directly. (sb_build): Fix off-by-one error in assertion about `size'.
Diffstat (limited to 'gas/sb.c')
-rw-r--r--gas/sb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/sb.c b/gas/sb.c
index ecd772c..f628835 100644
--- a/gas/sb.c
+++ b/gas/sb.c
@@ -56,7 +56,10 @@ static void sb_check (sb *, int);
static int string_count[sb_max_power_two];
/* Free list of sb structures. */
-static sb_list_vector free_list;
+static struct
+{
+ sb_element *size[sb_max_power_two];
+} free_list;
/* Initializes an sb. */
@@ -66,8 +69,7 @@ sb_build (sb *ptr, int size)
/* See if we can find one to allocate. */
sb_element *e;
- if (size > sb_max_power_two)
- abort ();
+ assert (size < sb_max_power_two);
e = free_list.size[size];
if (!e)