diff options
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/dir.c | 5 | ||||
-rw-r--r-- | ext2fs/hyper.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c index faed301e..256f3d36 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -965,7 +965,10 @@ diskfs_get_directs (struct node *dp, allocsize = round_page (bufsiz); if (allocsize > *datacnt) - *data = mmap (0, allocsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); + { + *data = mmap (0, allocsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); + assert_backtrace (*data != MAP_FAILED); + } /* Set bufp appropriately */ bufp = buf; diff --git a/ext2fs/hyper.c b/ext2fs/hyper.c index 82b06d17..d2440dc0 100644 --- a/ext2fs/hyper.c +++ b/ext2fs/hyper.c @@ -46,7 +46,7 @@ allocate_mod_map (void) mod_map_size = le32toh (sblock->s_blocks_count) >> 3; modified_global_blocks = mmap (0, mod_map_size, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); - assert_backtrace (modified_global_blocks != (void *) -1); + assert_backtrace (modified_global_blocks != MAP_FAILED); } else modified_global_blocks = 0; |