diff options
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/gdbreplay.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index d8a3c50..e9c960e 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2010-05-26 Ozkan Sezer <sezeroz@gmail.com> + + * gdbreplay.c (remote_open): Check error return from socket() call by + its equality to -1 not by it being negative. + * remote-utils.c (remote_open): Likewise. + 2010-05-23 Pedro Alves <pedro@codesourcery.com> * config.h: Regenerate. diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c index a128413..3ae8051 100644 --- a/gdb/gdbserver/gdbreplay.c +++ b/gdb/gdbserver/gdbreplay.c @@ -210,7 +210,7 @@ remote_open (char *name) #endif tmp_desc = socket (PF_INET, SOCK_STREAM, 0); - if (tmp_desc < 0) + if (tmp_desc == -1) perror_with_name ("Can't open socket"); /* Allow rapid reuse of this port. */ diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 6410659..164ce6a 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -305,7 +305,7 @@ remote_open (char *name) #endif listen_desc = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); - if (listen_desc < 0) + if (listen_desc == -1) perror_with_name ("Can't open socket"); /* Allow rapid reuse of this port. */ |