diff options
author | Maxim Grigoriev <maxim2405@gmail.com> | 2007-08-10 17:49:48 +0000 |
---|---|---|
committer | Maxim Grigoriev <maxim2405@gmail.com> | 2007-08-10 17:49:48 +0000 |
commit | 2794ff22333a937410ebc5023b02cdab22fefb80 (patch) | |
tree | 050e9bbb9944653d840907f87b3dfb5034b8cdb3 /gdb/remote-fileio.c | |
parent | 6146ccf5dcb43569ec90e75e0930784f8002025a (diff) | |
download | gdb-2794ff22333a937410ebc5023b02cdab22fefb80.tar.gz |
2007-08-10 Maxim Grigoriev <maxim2405@gmail.com>
* remote-fileio.c (remote_fileio_resize_fd_map): Initialize newly
allocated file descriptors.
Diffstat (limited to 'gdb/remote-fileio.c')
-rw-r--r-- | gdb/remote-fileio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 42c915bf96a..2f165e21f3e 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -70,12 +70,16 @@ remote_fileio_init_fd_map (void) static int remote_fileio_resize_fd_map (void) { + int i = remote_fio_data.fd_map_size; + if (!remote_fio_data.fd_map) return remote_fileio_init_fd_map (); remote_fio_data.fd_map_size += 10; remote_fio_data.fd_map = (int *) xrealloc (remote_fio_data.fd_map, remote_fio_data.fd_map_size * sizeof (int)); + for (; i < remote_fio_data.fd_map_size; i++) + remote_fio_data.fd_map[i] = FIO_FD_INVALID; return remote_fio_data.fd_map_size - 10; } |