summaryrefslogtreecommitdiff
path: root/gdb/m32r-rom.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@apple.com>1999-04-26 18:34:20 +0000
commitfe454715791b86ad488b33c1f325478803c8108c (patch)
tree91ec960676c78ffeab24ee2101fa128d2cc0f958 /gdb/m32r-rom.c
parentf3db0d6e5952e6aa06bdad615829b42d2cf52f71 (diff)
downloadgdb-fe454715791b86ad488b33c1f325478803c8108c.tar.gz
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 2be833e32e2..ac18e1c6cc5 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)
{