aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r--gdb/ser-tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index dd685e6..cb862e7 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -209,7 +209,7 @@ net_open (struct serial *scb, const char *name)
else
scb->fd = socket (PF_INET, SOCK_STREAM, 0);
- if (scb->fd < 0)
+ if (scb->fd == -1)
return -1;
/* set socket nonblocking */
@@ -325,7 +325,7 @@ net_open (struct serial *scb, const char *name)
void
net_close (struct serial *scb)
{
- if (scb->fd < 0)
+ if (scb->fd == -1)
return;
close (scb->fd);