mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
common/exechelp: Avoid magic numbers.
* common/exechelp-w32.c (do_create_pipe): Use symbolic names. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
5d8f7b16c8
commit
709e2a7e9a
@ -300,7 +300,7 @@ do_create_pipe (int filedes[2], int inherit_idx)
|
||||
err = gpg_error (GPG_ERR_GENERAL);
|
||||
if (!create_inheritable_pipe (fds, inherit_idx))
|
||||
{
|
||||
filedes[0] = _open_osfhandle (handle_to_fd (fds[0]), 0);
|
||||
filedes[0] = _open_osfhandle (handle_to_fd (fds[0]), O_RDONLY);
|
||||
if (filedes[0] == -1)
|
||||
{
|
||||
log_error ("failed to translate osfhandle %p\n", fds[0]);
|
||||
@ -308,7 +308,7 @@ do_create_pipe (int filedes[2], int inherit_idx)
|
||||
}
|
||||
else
|
||||
{
|
||||
filedes[1] = _open_osfhandle (handle_to_fd (fds[1]), 1);
|
||||
filedes[1] = _open_osfhandle (handle_to_fd (fds[1]), O_APPEND);
|
||||
if (filedes[1] == -1)
|
||||
{
|
||||
log_error ("failed to translate osfhandle %p\n", fds[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user