summaryrefslogtreecommitdiffstats
path: root/assuan
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2001-11-20 00:44:46 +0100
committerMarcus Brinkmann <mb@g10code.com>2001-11-20 00:44:46 +0100
commit647001387fa792529f11f97773ad3d400c95b193 (patch)
treeb72809d95b2bb351e74f00eeb4062658c929c6de /assuan
parentAdded new file to please Jan (diff)
downloadgnupg2-647001387fa792529f11f97773ad3d400c95b193.tar.xz
gnupg2-647001387fa792529f11f97773ad3d400c95b193.zip
* assuan-connect.c (assuan_pipe_connect): Require NAME to be set.
Using ARGV[0] automatically is bad mojo.
Diffstat (limited to 'assuan')
-rw-r--r--assuan/assuan-connect.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/assuan/assuan-connect.c b/assuan/assuan-connect.c
index 294a26cef..778b3a770 100644
--- a/assuan/assuan-connect.c
+++ b/assuan/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;