safe_macros: Add SAFE_GETRLIMIT and SAFE_SETRLIMIT

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
mlock/mlock02.c: cleanup

* Delete some useless commtents.
* Use SAFE_* macros.
* Some cleanup.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
mlock/mlock02.c: add EPERM and ENOMEM errno tests

Add EPERM and ENOMEM errno tests for mlock(2).

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>