From 7a292a7adf506b866905b06b3024c0fd411c4583 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Mon, 26 Apr 1999 18:34:20 +0000 Subject: import gdb-19990422 snapshot --- gdb/m32r-rom.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'gdb/m32r-rom.c') 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) { -- cgit v1.2.1