diff options
author | Marcus Brinkmann <mb@g10code.com> | 2001-11-19 23:44:46 +0000 |
---|---|---|
committer | Marcus Brinkmann <mb@g10code.com> | 2001-11-19 23:44:46 +0000 |
commit | 84e785be1f2effb282f57388595320d95476f147 (patch) | |
tree | d7cb8174643d1f3ce324c74f9d9981fb1f20cf9a | |
parent | 8837bf960bd112a0de63fa69084312914a8c2140 (diff) | |
download | libassuan-84e785be1f2effb282f57388595320d95476f147.tar.gz |
* assuan-connect.c (assuan_pipe_connect): Require NAME to be set.
Using ARGV[0] automatically is bad mojo.
-rw-r--r-- | src/assuan-connect.c | 8 |
1 files 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; |