Change func_exit return code

Change the not safe to exit code to E_BAD_VAL, since that makes
more sense than sending E_SUCCESS on a failure.