aboutsummaryrefslogtreecommitdiff
path: root/gas/frags.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-05-02 00:12:52 +0000
committerAlan Modra <amodra@gmail.com>2000-05-02 00:12:52 +0000
commit3f9b03b5daf721100e6cb36e2a3f903e96ea1dbd (patch)
tree619378e1e78b4c14b6282222852fd57f883431f0 /gas/frags.c
parentec1428fa1c4dc6092b5b815f0eb5c5d3f306c41d (diff)
downloadgdb-3f9b03b5daf721100e6cb36e2a3f903e96ea1dbd.zip
gdb-3f9b03b5daf721100e6cb36e2a3f903e96ea1dbd.tar.gz
gdb-3f9b03b5daf721100e6cb36e2a3f903e96ea1dbd.tar.bz2
Assorted code cleanup and fixes for hppa. Re-enable elf32-hppa as
it now compiles even if it doesn't work too well.
Diffstat (limited to 'gas/frags.c')
-rw-r--r--gas/frags.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gas/frags.c b/gas/frags.c
index 882cb12..6518f37 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -74,11 +74,13 @@ frag_grow (nchars)
frag_new (0);
oldc = frchain_now->frch_obstack.chunk_size;
frchain_now->frch_obstack.chunk_size = 2 * nchars + SIZEOF_STRUCT_FRAG;
- while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars)
- {
- frag_wane (frag_now);
- frag_new (0);
- }
+ if (frchain_now->frch_obstack.chunk_size > 0)
+ while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars
+ && (unsigned long) frchain_now->frch_obstack.chunk_size > nchars)
+ {
+ frag_wane (frag_now);
+ frag_new (0);
+ }
frchain_now->frch_obstack.chunk_size = oldc;
}
if (obstack_room (&frchain_now->frch_obstack) < nchars)