aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-rom.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-01 21:14:33 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-01 21:14:33 +0000
commit880bc914e0090a4076eeb385c8bf0cfe0b0142d4 (patch)
tree17fd59766e0af49f90ebe94de6d014325309f976 /gdb/m32r-rom.c
parent19f5934377cdd949da85bea862750e48f50aafde (diff)
downloadgdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.zip
gdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.tar.gz
gdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.tar.bz2
2003-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that m32r is multi-arch. From 2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>: * configure.tgt: Recognize m32r-*-*. * config/m32r/tm-m32r.h: Delete file. * config/m32r/m32r.mt: New file. * m32r-rom.c (m32r_upload_command): Use hostent only when gethostname succeeds, in order to avoid a compilation warning. * m32r-tdep.c (m32r_store_return_value): Add a cast to remove a compiler warning.
Diffstat (limited to 'gdb/m32r-rom.c')
-rw-r--r--gdb/m32r-rom.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index 444a6cd..970a8e6 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -492,16 +492,18 @@ m32r_upload_command (char *args, int from_tty)
buf[0] = 0;
gethostname (buf, sizeof (buf));
if (buf[0] != 0)
- hostent = gethostbyname (buf);
- if (hostent != 0)
{
+ hostent = gethostbyname (buf);
+ if (hostent != 0)
+ {
#if 1
- memcpy (&inet_addr.s_addr, hostent->h_addr,
- sizeof (inet_addr.s_addr));
- server_addr = (char *) inet_ntoa (inet_addr);
+ memcpy (&inet_addr.s_addr, hostent->h_addr,
+ sizeof (inet_addr.s_addr));
+ server_addr = (char *) inet_ntoa (inet_addr);
#else
- server_addr = (char *) inet_ntoa (hostent->h_addr);
+ server_addr = (char *) inet_ntoa (hostent->h_addr);
#endif
+ }
}
if (server_addr == 0) /* failed? */
error