gdbsupport: make gdb_mkostemp_cloexec return a scoped_fd
This encourages the callers to use automatic file descriptor management. Change-Id: I137a81df6f3607b457e28c35aafde8ed6f3a3344
This commit is contained in:
parent
13084383e8
commit
2fed9db40b
5 changed files with 13 additions and 12 deletions
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue