diff options
author | Neal H. Walfield <[email protected]> | 2015-08-17 10:33:29 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-08-20 12:16:26 +0000 |
commit | a6d4bca3b576c3c5dba1aa6e8c1039089e14147b (patch) | |
tree | fa9e5f9c45e7e05b034d63e5e0a76141a695e93c /common/iobuf.c | |
parent | common/iobuf: Improve documentation and code comments. (diff) | |
download | gnupg-a6d4bca3b576c3c5dba1aa6e8c1039089e14147b.tar.gz gnupg-a6d4bca3b576c3c5dba1aa6e8c1039089e14147b.zip |
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 <[email protected]>.
Diffstat (limited to 'common/iobuf.c')
-rw-r--r-- | common/iobuf.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index e859a5c70..4674fdf15 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -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)); } |