diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-05 00:52:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-05 00:52:03 +0200 |
commit | 10ff2967ea8d17f7e46599497214280a21ca409a (patch) | |
tree | 3ff24f2ef3877f0ca2e5ca4f6c70291f0c160d5d /libavutil/file.c | |
parent | 6dafa7065bfc0634398879d7069582bbe0b3a8f2 (diff) | |
download | ffmpeg-10ff2967ea8d17f7e46599497214280a21ca409a.tar.gz |
file: Fix mmap error check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/file.c')
-rw-r--r-- | libavutil/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/file.c b/libavutil/file.c index b2d380df9d..1fb7a2b5c9 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -75,7 +75,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, #if HAVE_MMAP ptr = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); - if ((int)(ptr) == -1) { + if (ptr == (void*)-1) { err = AVERROR(errno); av_strerror(err, errbuf, sizeof(errbuf)); av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in mmap(): %s\n", errbuf); |