From e1ab8914dbdfc407dbcb0e3fde33376bd460fece Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 13 Dec 2001 20:13:34 +0000 Subject: [PATCH] 2001-12-13 Marcus Brinkmann * assuan-buffer.c (assuan_read_line): Fix order of execution to get correct return values. --- trunk/assuan/ChangeLog | 5 +++++ trunk/assuan/assuan-buffer.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/trunk/assuan/ChangeLog b/trunk/assuan/ChangeLog index 0c8a4df..8d05c0e 100644 --- a/trunk/assuan/ChangeLog +++ b/trunk/assuan/ChangeLog @@ -1,3 +1,8 @@ +2001-12-13 Marcus Brinkmann + + * assuan-buffer.c (assuan_read_line): Fix order of execution to + get correct return values. + 2001-12-13 Werner Koch * assuan-handler.c (assuan_get_active_fds): Fixed silly bug, diff --git a/trunk/assuan/assuan-buffer.c b/trunk/assuan/assuan-buffer.c index 50900c4..ee085d0 100644 --- a/trunk/assuan/assuan-buffer.c +++ b/trunk/assuan/assuan-buffer.c @@ -172,11 +172,15 @@ _assuan_read_line (ASSUAN_CONTEXT ctx) AssuanError assuan_read_line (ASSUAN_CONTEXT ctx, char **line, size_t *linelen) { + AssuanError err; + if (!ctx) return ASSUAN_Invalid_Value; + + err = _assuan_read_line (ctx); *line = ctx->inbound.line; *linelen = ctx->inbound.linelen; - return _assuan_read_line (ctx); + return err; } -- 2.26.2