if (_stream->skip >= _stream->pos) {
*size_r = 0;
- return NULL;
+ return &uchar_nul;
}
if (i_stream_is_buffer_invalid(_stream)) {
_stream->skip = _stream->pos = 0;
stream->eof = FALSE;
}
- return NULL;
+ return &uchar_nul;
}
*size_r = _stream->pos - _stream->skip;
CRLF (instead of LF). */
bool i_stream_last_line_crlf(struct istream *stream);
-/* Returns pointer to beginning of read data, or NULL if there's no data
- buffered. */
+/* Returns pointer to beginning of read data. */
const unsigned char *i_stream_get_data(struct istream *stream, size_t *size_r);
size_t i_stream_get_data_size(struct istream *stream);
/* Like i_stream_get_data(), but returns non-const data. This only works with