[Pkg-gnupg-commit] [gnupg2] 51/205: common/exechelp: Avoid magic numbers.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 11 08:38:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 709e2a7e9a3197e8ded4be0b05c138e8d5adbca6
Author: Justus Winter <justus at g10code.com>
Date: Mon Jan 25 17:45:19 2016 +0100
common/exechelp: Avoid magic numbers.
* common/exechelp-w32.c (do_create_pipe): Use symbolic names.
Signed-off-by: Justus Winter <justus at g10code.com>
---
common/exechelp-w32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c
index 3ddff8e..11bcea7 100644
--- a/common/exechelp-w32.c
+++ b/common/exechelp-w32.c
@@ -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]);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list