mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-02 16:43:03 +01:00
common/iobuf.c:iobuf_write_temp: Elide redundant code.
* common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp. Use it directly. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
parent
a6d4bca3b5
commit
e291b631c3
@ -2114,11 +2114,13 @@ iobuf_writestr (iobuf_t a, const char *buf)
|
||||
|
||||
|
||||
int
|
||||
iobuf_write_temp (iobuf_t a, iobuf_t temp)
|
||||
iobuf_write_temp (iobuf_t dest, iobuf_t source)
|
||||
{
|
||||
while (temp->chain)
|
||||
pop_filter (temp, temp->filter, NULL);
|
||||
return iobuf_write (a, temp->d.buf, temp->d.len);
|
||||
assert (source->use == IOBUF_OUTPUT || source->use == IOBUF_TEMP);
|
||||
assert (dest->use == IOBUF_OUTPUT || dest->use == IOBUF_TEMP);
|
||||
|
||||
iobuf_flush_temp (source);
|
||||
return iobuf_write (dest, source->d.buf, source->d.len);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
Loading…
x
Reference in New Issue
Block a user