diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2017-04-12 02:24:48 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2017-04-12 02:24:48 +0200 |
commit | c64763c3a74ecc61c2f6c5edb679a2a3879d79e7 (patch) | |
tree | 42e97408e60069c7edd5b4c7a025a050c6e69c79 /agent/command-ssh.c | |
parent | dirmngr: Use a function to increment network short. (diff) | |
download | gnupg2-c64763c3a74ecc61c2f6c5edb679a2a3879d79e7.tar.xz gnupg2-c64763c3a74ecc61c2f6c5edb679a2a3879d79e7.zip |
agent: Simplify stream_read_cstring.
* agent/command-ssh.c (stream_read_cstring): Just call
stream_read_string.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'agent/command-ssh.c')
-rw-r--r-- | agent/command-ssh.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c index b15d8b287..eeb14988e 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -674,13 +674,7 @@ stream_read_blob (estream_t stream, unsigned int secure, gcry_mpi_t *r_mpi) static gpg_error_t stream_read_cstring (estream_t stream, char **string) { - gpg_error_t err; - unsigned char *buffer; - - err = stream_read_string (stream, 0, &buffer, NULL); - if (!err) - *string = (char *)buffer; - return err; + return stream_read_string (stream, 0, (unsigned char **)string, NULL); } |