mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +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
|
||||
iobuf_writestr (iobuf_t a, const char *buf)
|
||||
{
|
||||
int rc;
|
||||
|
||||
for (; *buf; buf++)
|
||||
if ((rc=iobuf_writebyte (a, *buf)))
|
||||
return rc;
|
||||
return 0;
|
||||
return iobuf_write (a, buf, strlen (buf));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user