From a6d4bca3b576c3c5dba1aa6e8c1039089e14147b Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Mon, 17 Aug 2015 12:33:29 +0200 Subject: 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 . --- common/iobuf.c | 7 +------ 1 file changed, 1 insertion(+), 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)); } -- cgit v1.2.3