OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f44967b
)
Use MAP_FAILED to check for mmap failure instead of manually
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 08:00:03 +0000
(10:00 +0200)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 08:34:55 +0000
(10:34 +0200)
recreating the value.
libavutil/file.c
patch
|
blob
|
history
diff --git
a/libavutil/file.c
b/libavutil/file.c
index
1fb7a2b
..
ed6fa38
100644
(file)
--- 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 (ptr ==
(void*)-1
) {
+ if (ptr ==
MAP_FAILED
) {
err = AVERROR(errno);
av_strerror(err, errbuf, sizeof(errbuf));
av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in mmap(): %s\n", errbuf);