Skip to content

Commit

Permalink
mbox: Add assert to make static analyzer happier
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Nov 5, 2017
1 parent 58336fc commit 872c2b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-storage/index/mbox/mbox-save.c
Expand Up @@ -681,6 +681,7 @@ int mbox_save_finish(struct mail_save_context *_ctx)

if (ctx->failed && ctx->mail_offset != (uoff_t)-1) {
/* saving this mail failed - truncate back to beginning of it */
i_assert(ctx->output != NULL);
(void)o_stream_flush(ctx->output);
if (ftruncate(ctx->mbox->mbox_fd, (off_t)ctx->mail_offset) < 0)
mbox_set_syscall_error(ctx->mbox, "ftruncate()");
Expand Down

0 comments on commit 872c2b1

Please sign in to comment.