提交 0a6671b5 编写于 作者: G goetz

8030875: Macros for checking and returning on exceptions

Summary: Add missing 8030875 changes in 8u
Reviewed-by: mchung, kvn
上级 46f97157
......@@ -32,6 +32,8 @@
#include <stdlib.h>
#include <stdarg.h>
#include "jni_util.h"
#include "defines.h"
#include "bytes.h"
#include "utils.h"
......@@ -147,7 +149,7 @@ coding* coding::findBySpec(int spec) {
break;
}
coding* ptr = NEW(coding, 1);
CHECK_NULL_0(ptr);
CHECK_NULL_RETURN(ptr, 0);
coding* c = ptr->initFrom(spec);
if (c == null) {
mtrace('f', ptr, 0);
......
......@@ -158,10 +158,6 @@ enum { false, true };
#define CHECK_(y) _CHECK_DO(aborting(), return y)
#define CHECK_0 _CHECK_DO(aborting(), return 0)
#define CHECK_NULL(p) _CHECK_DO((p)==null, return)
#define CHECK_NULL_(y,p) _CHECK_DO((p)==null, return y)
#define CHECK_NULL_0(p) _CHECK_DO((p)==null, return 0)
#define CHECK_COUNT(t) if (t < 0){abort("bad value count");} CHECK
#define STR_TRUE "true"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册