aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index d64af18..81cf9bc 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -1091,7 +1091,8 @@ getpkt (char *buf)
fprintf (stderr, "Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n",
(c1 << 4) + c2, csum, buf);
- write (remote_desc, "-", 1);
+ if (write (remote_desc, "-", 1) != 1)
+ return -1;
}
if (!noack_mode)
@@ -1102,7 +1103,8 @@ getpkt (char *buf)
fflush (stderr);
}
- write (remote_desc, "+", 1);
+ if (write (remote_desc, "+", 1) != 1)
+ return -1;
if (remote_debug)
{