]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
i_stream_next_line(): Fix for the previous optimization.
authorTimo Sirainen <tss@iki.fi>
Wed, 1 Sep 2010 16:10:14 +0000 (17:10 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 1 Sep 2010 16:10:14 +0000 (17:10 +0100)
src/lib/istream.c

index 982eb69b3defd7f61d1d3f0c5fe24973d309dc27..21865b062e8e869d5daa46867cb0b0b03da79df3 100644 (file)
@@ -351,7 +351,7 @@ char *i_stream_next_line(struct istream *stream)
 
        pos = memchr(_stream->buffer + _stream->skip, '\n',
                     _stream->pos - _stream->skip);
-       if (pos == NULL) {
+       if (pos != NULL) {
                return i_stream_next_line_finish(_stream,
                                                 pos - _stream->buffer);
        } else {