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:
Justus Winter 2016-01-25 17:45:19 +01:00
parent 5d8f7b16c8
commit 709e2a7e9a
1 changed files with 2 additions and 2 deletions

View File

@ -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]);