aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-fileio.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-03 18:35:32 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-03 18:35:32 +0000
commit2e3fd7679d44288bc1f0e9cf28fe3a04c854e08d (patch)
tree307734d4facb76c77b50b50554beff094aee3a2a /gdb/remote-fileio.c
parent3e2a0cee5514e0c5d2d1c6d71e504eb618e50c3b (diff)
downloadgdb-2e3fd7679d44288bc1f0e9cf28fe3a04c854e08d.zip
gdb-2e3fd7679d44288bc1f0e9cf28fe3a04c854e08d.tar.gz
gdb-2e3fd7679d44288bc1f0e9cf28fe3a04c854e08d.tar.bz2
2011-03-03 Michael Snyder <msnyder@vmware.com>
* remote-fileio.c (remote_fileio_func_fstat): Initialize all fields of struct 'st' to zero.
Diffstat (limited to 'gdb/remote-fileio.c')
-rw-r--r--gdb/remote-fileio.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 38d7c7c..7338b97 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -1173,20 +1173,15 @@ remote_fileio_func_fstat (char *buf)
if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
{
remote_fileio_to_fio_uint (1, fst.fst_dev);
+ memset (&st, 0, sizeof (st));
st.st_mode = S_IFCHR | (fd == FIO_FD_CONSOLE_IN ? S_IRUSR : S_IWUSR);
st.st_nlink = 1;
#ifdef HAVE_GETUID
st.st_uid = getuid ();
-#else
- st.st_uid = 0;
#endif
#ifdef HAVE_GETGID
st.st_gid = getgid ();
-#else
- st.st_gid = 0;
#endif
- st.st_rdev = 0;
- st.st_size = 0;
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
st.st_blksize = 512;
#endif