1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

common/iobuf.c: Have iobuf_writestr use iobuf_write, not iobuf_writebyte

* common/iobuf.c (iobuf_write): Don't write a byte at a time.  Use
iobuf_write.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-08-17 12:33:29 +02:00
parent 1bfd1e4324
commit a6d4bca3b5

View File

@ -2108,12 +2108,7 @@ iobuf_write (iobuf_t a, const void *buffer, unsigned int buflen)
int int
iobuf_writestr (iobuf_t a, const char *buf) iobuf_writestr (iobuf_t a, const char *buf)
{ {
int rc; return iobuf_write (a, buf, strlen (buf));
for (; *buf; buf++)
if ((rc=iobuf_writebyte (a, *buf)))
return rc;
return 0;
} }