aboutsummaryrefslogtreecommitdiff
path: root/bfd/mmo.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-25 06:21:54 +0000
committerAlan Modra <amodra@gmail.com>2002-06-25 06:21:54 +0000
commit82e51918269aaa9b2f890217c141d7ae9dd2928f (patch)
tree1d858cc8b58398a07832d26417a46ef672633210 /bfd/mmo.c
parentc0e624e73fb1802a2bfe7143aeddeccd78bd3900 (diff)
downloadgdb-82e51918269aaa9b2f890217c141d7ae9dd2928f.zip
gdb-82e51918269aaa9b2f890217c141d7ae9dd2928f.tar.gz
gdb-82e51918269aaa9b2f890217c141d7ae9dd2928f.tar.bz2
* aout-adobe.c: Don't compare against "true" or "false.
* aout-target.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bout.c: Likewise. * cache.c: Likewise. * coff-a29k.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cpu-ns32k.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-d30v.c: Likewise. * elf32-i386.c: Likewise. * elf32-mcore.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-sh64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.h: Likewise. * elfxx-mips.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mmo.c: Likewise. * nlm32-alpha.c: Likewise. * nlm32-i386.c: Likewise. * nlm32-ppc.c: Likewise. * nlm32-sparc.c: Likewise. * nlmcode.h: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * som.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * vms.c: Likewise. * xcofflink.c: Likewise. * elf64-sparc.c: Edit comment to not use "== false". * aoutf1.h: Don't use "? true : false". * ecoff.c: Likewise. * format.c: Likewise. * ieee.c: Likewise. * linker.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise.
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r--bfd/mmo.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 3238e22..7bf064d 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -481,7 +481,7 @@ mmo_init ()
static const char letters[]
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_";
- if (inited == true)
+ if (inited)
return;
inited = true;
@@ -846,10 +846,9 @@ mmo_write_chunk (abfd, loc, len)
if (loc[0] == LOP)
mmo_write_tetra_raw (abfd, LOP_QUOTE_NEXT);
- retval
- = (retval == true
- && abfd->tdata.mmo_data->have_error == false
- && 4 == bfd_bwrite ((PTR) loc, 4, abfd));
+ retval = (retval
+ && ! abfd->tdata.mmo_data->have_error
+ && 4 == bfd_bwrite ((PTR) loc, 4, abfd));
loc += 4;
len -= 4;
@@ -861,7 +860,7 @@ mmo_write_chunk (abfd, loc, len)
abfd->tdata.mmo_data->byte_no = len;
}
- if (retval == false)
+ if (! retval)
abfd->tdata.mmo_data->have_error = true;
return retval;
}
@@ -882,7 +881,7 @@ mmo_flush_chunk (abfd)
abfd->tdata.mmo_data->byte_no = 0;
}
- return abfd->tdata.mmo_data->have_error == false;
+ return ! abfd->tdata.mmo_data->have_error;
}
/* Same, but from a list. */
@@ -941,9 +940,8 @@ mmo_write_loc_chunk (abfd, vma, loc, len, last_vmap)
/* Update to reflect end of this chunk, with trailing zeros omitted. */
*last_vmap = vma + len;
- return
- abfd->tdata.mmo_data->have_error == false
- && mmo_write_chunk (abfd, loc, len);
+ return (! abfd->tdata.mmo_data->have_error
+ && mmo_write_chunk (abfd, loc, len));
}
/* Same, but from a list. */
@@ -1161,7 +1159,7 @@ mmo_get_byte (abfd)
if (abfd->tdata.mmo_data->byte_no == 0)
{
- if (abfd->tdata.mmo_data->have_error == false
+ if (! abfd->tdata.mmo_data->have_error
&& bfd_bread (abfd->tdata.mmo_data->buf, 4, abfd) != 4)
{
abfd->tdata.mmo_data->have_error = true;
@@ -1188,7 +1186,7 @@ mmo_write_byte (abfd, value)
abfd->tdata.mmo_data->buf[(abfd->tdata.mmo_data->byte_no++ % 4)] = value;
if ((abfd->tdata.mmo_data->byte_no % 4) == 0)
{
- if (abfd->tdata.mmo_data->have_error == false
+ if (! abfd->tdata.mmo_data->have_error
&& bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4)
abfd->tdata.mmo_data->have_error = true;
}
@@ -1354,7 +1352,7 @@ SUBSECTION
bfd_byte m = mmo_get_byte (abfd);
/* Check first if we have a bad hair day. */
- if (abfd->tdata.mmo_data->have_error == true)
+ if (abfd->tdata.mmo_data->have_error)
return false;
if (m & MMO3_LEFT)
@@ -1438,7 +1436,7 @@ SUBSECTION
serno -= 128;
/* Got it. Now enter it. Skip a leading ":". */
- if (abfd->tdata.mmo_data->have_error == false
+ if (! abfd->tdata.mmo_data->have_error
&& ! mmo_create_symbol (abfd,
abfd->tdata.mmo_data->lop_stab_symbol
+ 1,
@@ -1457,7 +1455,7 @@ SUBSECTION
/* Traverse right trie. */
mmo_get_symbols (abfd);
- return abfd->tdata.mmo_data->have_error == false;
+ return ! abfd->tdata.mmo_data->have_error;
}
/* Get the location of memory area [VMA..VMA + SIZE - 1], which we think
@@ -2060,7 +2058,7 @@ mmo_scan (abfd)
for (i = 0; i < sizeof (file_names) / sizeof (file_names[0]); i++)
if (file_names[i])
free (file_names[i]);
- return error ? false : true;
+ return ! error;
}
/* A hook to set up object file dependent section information. For mmo,
@@ -2335,9 +2333,7 @@ mmo_internal_write_post (abfd, z, sec)
Z == 255, don't assume DATA is valid. */
bfd_put_64 (abfd, bfd_get_start_address (abfd), buf);
- return
- abfd->tdata.mmo_data->have_error == false
- && bfd_bwrite (buf, 8, abfd) == 8;
+ return ! abfd->tdata.mmo_data->have_error && bfd_bwrite (buf, 8, abfd) == 8;
}
/* Translate to and from BFD flags. This is to make sure that we don't
@@ -2442,11 +2438,10 @@ mmo_internal_write_section (abfd, sec)
{
int n = atoi (sec->name + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX));
mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_SPEC << 16) | n);
- return
- abfd->tdata.mmo_data->have_error == false
- && mmo_write_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head);
+ return (! abfd->tdata.mmo_data->have_error
+ && mmo_write_chunk_list (abfd,
+ ((struct mmo_section_data_struct *)
+ (sec->used_by_bfd))->head));
}
/* Ignore sections that are just allocated or empty; we write out
_contents_ here. */
@@ -2563,13 +2558,13 @@ EXAMPLE
/* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually
loaded. */
if (bfd_get_section_flags (abfd, sec) & SEC_LOAD)
- return
- abfd->tdata.mmo_data->have_error == false
+ return
+ ! abfd->tdata.mmo_data->have_error
&& mmo_write_loc_chunk_list (abfd,
((struct mmo_section_data_struct *)
(sec->used_by_bfd))->head);
return
- abfd->tdata.mmo_data->have_error == false
+ ! abfd->tdata.mmo_data->have_error
&& mmo_write_chunk_list (abfd,
((struct mmo_section_data_struct *)
(sec->used_by_bfd))->head);
@@ -3088,7 +3083,7 @@ mmo_write_section_unless_reg_contents (abfd, sec, p)
{
struct mmo_write_sec_info *infop = (struct mmo_write_sec_info *) p;
- if (infop->retval == false)
+ if (! infop->retval)
return;
if (strcmp (sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0)
@@ -3139,7 +3134,7 @@ mmo_write_object_contents (abfd)
bfd_map_over_sections (abfd, mmo_write_section_unless_reg_contents,
(PTR) &wsecinfo);
- if (wsecinfo.retval == false)
+ if (! wsecinfo.retval)
return false;
if (wsecinfo.reg_section != NULL)