Skip to content

Commit

Permalink
lib: Added o_stream_unix_write_fd() assert: fd>=0
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed May 3, 2016
1 parent d2c9e28 commit eb8143d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/ostream-unix.c
Expand Up @@ -83,6 +83,8 @@ bool o_stream_unix_write_fd(struct ostream *output, int fd)
struct unix_ostream *ustream =
(struct unix_ostream *)output->real_stream;

i_assert(fd >= 0);

if (ustream->write_fd >= 0)
return FALSE;
ustream->write_fd = fd;
Expand Down

0 comments on commit eb8143d

Please sign in to comment.