提交 ab1ce9bd 编写于 作者: M Michael McConville 提交者: Michael Tokarev

mmap(2) returns MAP_FAILED, not NULL, on failure

Signed-off-by: NMichael McConville <mmcco@mykolab.com>
Reviewed-by: NJohn Snow <jsnow@redhat.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 9aae6e54
......@@ -199,7 +199,7 @@ static void xen_remap_bucket(MapCacheEntry *entry,
*/
vaddr_base = mmap(vaddr, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_SHARED, -1, 0);
if (vaddr_base == NULL) {
if (vaddr_base == MAP_FAILED) {
perror("mmap");
exit(-1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册