]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
src: fix up mmap() error checking
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Wed, 20 Jun 2018 22:51:46 +0000 (16:51 -0600)
committerEryu Guan <guaneryu@gmail.com>
Fri, 22 Jun 2018 02:23:55 +0000 (10:23 +0800)
commit424cdb8c0a7ce5d206c3b585abdf1846c221474b
tree2cace0a9f43b72775165bd85333b020b1ea0585a
parentf5cc573281340154a422fae0688afc57a9d90e4d
src: fix up mmap() error checking

I noticed that in some of my C tests in src/ I was incorrectly
checking for mmap() failure by looking for NULL instead of
MAP_FAILED.  Fix those and clean up some places where we were
testing against -1 (the actual value of MAP_FAILED) which was
manually being cast to a pointer.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c
src/fstest.c
src/t_ext4_dax_inline_corruption.c
src/t_ext4_dax_journal_corruption.c
src/t_mmap_stale_pmd.c
src/t_mmap_writev.c