summaryrefslogtreecommitdiff
path: root/sim/m32c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/m32c')
-rw-r--r--sim/m32c/ChangeLog5
-rw-r--r--sim/m32c/main.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 982793734d6..49dfa03a520 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
+
+ * main.c (setup_tcp_console): Check error return from socket() call
+ by its equality to -1 not by it being negative.
+
2010-04-14 Mike Frysinger <vapier@gentoo.org>
* gdb-if.c (sim_write): Add const to buf arg.
diff --git a/sim/m32c/main.c b/sim/m32c/main.c
index 589a6005f3c..2f31242fbde 100644
--- a/sim/m32c/main.c
+++ b/sim/m32c/main.c
@@ -98,7 +98,7 @@ setup_tcp_console (char *portname)
address.sin_port = htons (port);
isocket = socket (AF_INET, SOCK_STREAM, 0);
- if (isocket < 0)
+ if (isocket == -1)
{
perror ("socket");
exit (1);