stream: fix clang warning

Good clang catches programming errors. `open(2)` takes `int` not `mode_t`.
This commit is contained in:
Stefano Pigozzi 2013-12-07 17:14:20 +01:00
parent 20d1fc132e
commit e4f35516fb
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ static int open_f(stream_t *stream, int mode)
}; };
stream->priv = priv; stream->priv = priv;
mode_t m = O_CLOEXEC; int m = O_CLOEXEC;
if (mode == STREAM_READ) if (mode == STREAM_READ)
m |= O_RDONLY; m |= O_RDONLY;
else if (mode == STREAM_WRITE) else if (mode == STREAM_WRITE)