Fix a return value bug which would cause unused-return warning. This is exposed with -D_FORTIFY_SOURCE=2.

Signed-off-by: rong zeng <rongzeng@us.ibm.com>