Commit 012c66dd 012c66ddbbf4c852f2f26e1c075e7ddb808559c1 by Sergey Poznyakoff

Minor change

* libmailutils/mime/mime.c: Fix formatting
1 parent 447719f6
......@@ -244,8 +244,7 @@ _mime_append_header_line (mu_mime_t mime)
{
char *nhb;
if ((nhb =
realloc (mime->header_buf,
if ((nhb = realloc (mime->header_buf,
mime->header_length + mime->line_ndx + 128)) == NULL)
return;
mime->header_buf = nhb;
......@@ -271,8 +270,8 @@ _mime_parse_mpart_message (mu_mime_t mime)
if ((ret = _mime_setup_buffers (mime)) != 0)
return ret;
if ((boundary =
_mime_get_param (mime->content_type, "boundary", &len)) == NULL)
if ((boundary = _mime_get_param (mime->content_type, "boundary", &len))
== NULL)
return EINVAL;
if ((mime->boundary = calloc (1, len + 1)) == NULL)
return ENOMEM;
......@@ -289,8 +288,7 @@ _mime_parse_mpart_message (mu_mime_t mime)
blength = strlen (mime->boundary);
mu_stream_seek (mime->stream, mime->cur_offset, MU_SEEK_SET, NULL);
while ((ret =
mu_stream_read (mime->stream, mime->cur_buf, mime->buf_size,
while ((ret = mu_stream_read (mime->stream, mime->cur_buf, mime->buf_size,
&nbytes)) == 0 && nbytes)
{
cp = mime->cur_buf;
......@@ -308,9 +306,8 @@ _mime_parse_mpart_message (mu_mime_t mime)
break;
case MIME_STATE_SCAN_BOUNDARY:
cp2 =
mime->cur_line[0] ==
'\n' ? mime->cur_line + 1 : mime->cur_line;
cp2 = mime->cur_line[0] == '\n'
? mime->cur_line + 1 : mime->cur_line;
if (mime->line_ndx >= blength)
{
if ((!strncmp (cp2, "--", 2)
......@@ -657,7 +654,8 @@ _mime_body_stream_seek (mu_stream_t stream, mu_off_t off, mu_off_t *presult)
while (0)
static int
_mime_body_stream_read (mu_stream_t stream, char *buf, size_t buflen, size_t *nbytes)
_mime_body_stream_read (mu_stream_t stream, char *buf, size_t buflen,
size_t *nbytes)
{
struct _mime_body_stream *mstr = (struct _mime_body_stream *)stream;
mu_mime_t mime = mstr->mime;
......@@ -898,8 +896,7 @@ mu_mime_create (mu_mime_t *pmime, mu_message_t msg, int flags)
{
if ((ret = mu_message_get_header (msg, &mime->hdrs)) == 0)
{
if ((ret =
mu_header_get_value (mime->hdrs,
if ((ret = mu_header_get_value (mime->hdrs,
MU_HEADER_CONTENT_TYPE,
NULL, 0, &size)) == 0 && size)
{
......@@ -1039,7 +1036,8 @@ mu_mime_get_part (mu_mime_t mime, size_t part, mu_message_t *msg)
if (ret == 0)
{
mu_stream_set_flags (stream,
MU_STREAM_READ | (flags &
MU_STREAM_READ
| (flags &
(MU_STREAM_SEEK
| MU_STREAM_NONBLOCK)));
mu_body_set_stream (body, stream, mime_part->msg);
......