[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/4] libxl_internal.c: Fix return handling for case of mmap failure
mmap() returns MAP_FAILED not NULL. Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx> --- tools/libxl/libxl_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 81f8985..b880c89 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -246,7 +246,7 @@ int libxl__file_reference_map(libxl__file_reference *f) ret = -1; data = mmap(NULL, st_buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - if (data == NULL) + if (data == MAP_FAILED) goto out; f->mapped = 1; -- 1.8.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |