aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-rom.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
commit7a292a7adf506b866905b06b3024c0fd411c4583 (patch)
tree5b208bb48269b8a82d5c3a5f19c87b45a62a22f4 /gdb/m32r-rom.c
parent1996fae84682e8ddd146215dd2959ad1ec924c09 (diff)
downloadfsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.zip
fsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.gz
fsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.bz2
import gdb-19990422 snapshot
Diffstat (limited to 'gdb/m32r-rom.c')
-rw-r--r--gdb/m32r-rom.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index 2be833e..ac18e1c 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -221,7 +221,8 @@ m32r_supply_register (regname, regnamelen, val, vallen)
if (regno == ACCL_REGNUM)
{ /* special handling for 64-bit acc reg */
monitor_supply_register (ACCH_REGNUM, val);
- if (val = (char *) strchr(val, ':')) /* skip past ':' to get 2nd word */
+ val = strchr (val, ':'); /* skip past ':' to get 2nd word */
+ if (val != NULL)
monitor_supply_register (ACCL_REGNUM, val + 1);
}
else
@@ -525,10 +526,12 @@ m32r_upload_command (args, from_tty)
args = get_exec_file (1);
if (args[0] != '/' && download_path == 0)
- if (current_directory)
- download_path = strsave (current_directory);
- else
- error ("Need to know default download path (use 'set download-path')");
+ {
+ if (current_directory)
+ download_path = strsave (current_directory);
+ else
+ error ("Need to know default download path (use 'set download-path')");
+ }
start_time = time (NULL);
monitor_printf ("uhip %s\r", server_addr);
@@ -553,7 +556,8 @@ m32r_upload_command (args, from_tty)
printf_filtered (" -- Ethernet load complete.\n");
end_time = time (NULL);
- if (abfd = bfd_openr (args, 0))
+ abfd = bfd_openr (args, 0);
+ if (abfd != NULL)
{ /* Download is done -- print section statistics */
if (bfd_check_format (abfd, bfd_object) == 0)
{