Skip to content

Commit

Permalink
lib: istream-jsonstr - minor code cleanup
Browse files Browse the repository at this point in the history
If ret==0 here, it means dest wasn't changed, which must mean that i==0.
Make it clear to avoid confusion.
  • Loading branch information
sirainen authored and GitLab committed Dec 23, 2016
1 parent e0bd5e6 commit 076c46c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/istream-jsonstr.c
Expand Up @@ -154,8 +154,9 @@ static ssize_t i_stream_jsonstr_read(struct istream_private *stream)
ret = dest - stream->pos;
if (ret == 0) {
/* not enough input */
i_assert(i == 0);
i_assert(extra > 0);
ret = i_stream_jsonstr_read_parent(jstream, i+extra+1);
ret = i_stream_jsonstr_read_parent(jstream, extra+1);
if (ret <= 0)
return ret;
return i_stream_jsonstr_read(stream);
Expand Down

0 comments on commit 076c46c

Please sign in to comment.