* 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'.
This commit is contained in:
parent
e460dd0d29
commit
58633d9add
3 changed files with 11 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-05-02 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* 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'.
|
||||
|
||||
2006-05-01 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* listing.c (listing_listing): Remove useless loop.
|
||||
|
|
8
gas/sb.c
8
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)
|
||||
|
|
8
gas/sb.h
8
gas/sb.h
|
@ -70,14 +70,6 @@ typedef struct le
|
|||
}
|
||||
sb_element;
|
||||
|
||||
/* The free list. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_element *size[sb_max_power_two];
|
||||
}
|
||||
sb_list_vector;
|
||||
|
||||
extern void sb_new (sb *);
|
||||
extern void sb_kill (sb *);
|
||||
extern void sb_add_sb (sb *, sb *);
|
||||
|
|
Loading…
Reference in a new issue