1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

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>
This commit is contained in:
NIIBE Yutaka 2017-04-12 09:24:48 +09:00
parent 64904ce627
commit c64763c3a7

View File

@ -674,13 +674,7 @@ stream_read_blob (estream_t stream, unsigned int secure, gcry_mpi_t *r_mpi)
static gpg_error_t static gpg_error_t
stream_read_cstring (estream_t stream, char **string) stream_read_cstring (estream_t stream, char **string)
{ {
gpg_error_t err; return stream_read_string (stream, 0, (unsigned char **)string, NULL);
unsigned char *buffer;
err = stream_read_string (stream, 0, &buffer, NULL);
if (!err)
*string = (char *)buffer;
return err;
} }