semop/semop02.c: cleanup

* Delete some useless commtents.
* Move the test body form main to a new
  semop_verify function.
* Use some SAFE_* macros.
* Some cleanup.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
semop/semop02.c: add ERANGE error value test

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>