From 37870234a195fb76f36284ac4bdb5dc172078724 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 11 Mar 2010 12:34:11 +0000 Subject: Use a custom log handler for libassuan. --- common/estream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/estream.c') diff --git a/common/estream.c b/common/estream.c index dfa2de4aa..32567e631 100644 --- a/common/estream.c +++ b/common/estream.c @@ -2028,6 +2028,8 @@ es_set_buffering (estream_t ES__RESTRICT stream, buffer_new = buffer; else { + if (!size) + size = BUFSIZ; buffer_new = mem_alloc (size); if (! buffer_new) { @@ -3207,8 +3209,8 @@ es_setvbuf (estream_t ES__RESTRICT stream, { int err; - if (((type == _IOFBF) || (type == _IOLBF) || (type == _IONBF)) - && (! ((! size) && (type != _IONBF)))) + if ((type == _IOFBF || type == _IOLBF || type == _IONBF) + && (!buf || size || type == _IONBF)) { ESTREAM_LOCK (stream); err = es_set_buffering (stream, buf, type, size); -- cgit v1.2.3