aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/hostio.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-14 21:26:24 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-14 21:26:24 +0000
commit588eebeeea9e5f23fe4bd5e5870aa4de67337402 (patch)
tree63b78ac4633115b732940c48ea758bcc6999a3d3 /gdb/gdbserver/hostio.c
parent0cbf3531351540a91e7dd2b5c00696618bc93ee2 (diff)
downloadgdb-588eebeeea9e5f23fe4bd5e5870aa4de67337402.zip
gdb-588eebeeea9e5f23fe4bd5e5870aa4de67337402.tar.gz
gdb-588eebeeea9e5f23fe4bd5e5870aa4de67337402.tar.bz2
2011-03-14 Michael Snyder <msnyder@vmware.com>
* gdbserver/hostio.c (handle_close): Remove unnecessary null test.
Diffstat (limited to 'gdb/gdbserver/hostio.c')
-rw-r--r--gdb/gdbserver/hostio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index 3b65feb..7105013 100644
--- a/gdb/gdbserver/hostio.c
+++ b/gdb/gdbserver/hostio.c
@@ -418,7 +418,8 @@ handle_close (char *own_buf)
}
open_fd_p = &open_fds;
- while (*open_fd_p && (*open_fd_p)->fd != fd)
+ /* We know that fd is in the list, thanks to require_valid_fd. */
+ while ((*open_fd_p)->fd != fd)
open_fd_p = &(*open_fd_p)->next;
old_fd = *open_fd_p;