aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-05 00:52:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-05 00:52:03 +0200
commit10ff2967ea8d17f7e46599497214280a21ca409a (patch)
tree3ff24f2ef3877f0ca2e5ca4f6c70291f0c160d5d /libavutil
parent6dafa7065bfc0634398879d7069582bbe0b3a8f2 (diff)
downloadffmpeg-10ff2967ea8d17f7e46599497214280a21ca409a.tar.gz
file: Fix mmap error check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/file.c2
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);