[Pkg-gnupg-commit] [libassuan] 09/437: * assuan-connect.c (assuan_pipe_connect): Require NAME to be set. Using ARGV[0] automatically is bad mojo.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 84e785be1f2effb282f57388595320d95476f147
Author: Marcus Brinkmann <mb at g10code.com>
Date:   Mon Nov 19 23:44:46 2001 +0000

    	* assuan-connect.c (assuan_pipe_connect): Require NAME to be set.
    	Using ARGV[0] automatically is bad mojo.
---
 src/assuan-connect.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/assuan-connect.c b/src/assuan-connect.c
index 294a26c..778b3a7 100644
--- a/src/assuan-connect.c
+++ b/src/assuan-connect.c
@@ -31,8 +31,7 @@
 
 /* Connect to a server over a pipe, creating the assuan context and
    returning it in CTX.  The server filename is NAME, the argument
-   vector in ARGV.  If NAME is NULL, the first element in ARGV is
-   used.  */
+   vector in ARGV.  */
 AssuanError
 assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[])
 {
@@ -42,12 +41,9 @@ assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[])
   int wp[2];
   int fd[2];
 
-  if (!argv || !argv[0])
+  if (!name || !argv || !argv[0])
     return ASSUAN_General_Error;
 
-  if (!name)
-    name = argv[0];
-
   if (!fixed_signals)
     { 
       struct sigaction act;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list