diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-07-22 15:33:42 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-30 15:21:48 -0400 |
commit | 2fed9db40b1179f62c6fb0f2cacfb0db6b50af46 (patch) | |
tree | d47c517c106ec8bc88b6733d2b26f54f50dfec7c /gdb/dwarf2 | |
parent | 13084383e8955c2ff7017ac8839301688a9ee34d (diff) | |
download | gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.zip gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.tar.gz gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.tar.bz2 |
gdbsupport: make gdb_mkostemp_cloexec return a scoped_fd
This encourages the callers to use automatic file descriptor management.
Change-Id: I137a81df6f3607b457e28c35aafde8ed6f3a3344
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/index-write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 0318b7a..e92def7 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1538,8 +1538,8 @@ struct index_wip_file filename_temp = make_temp_filename (filename); - scoped_fd out_file_fd (gdb_mkostemp_cloexec (filename_temp.data (), - O_BINARY)); + scoped_fd out_file_fd = gdb_mkostemp_cloexec (filename_temp.data (), + O_BINARY); if (out_file_fd.get () == -1) perror_with_name (("mkstemp")); |