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:
parent
1bfd1e4324
commit
a6d4bca3b5
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user