changeset 8708:03a56cf98284

8030875: Macros for checking and returning on exceptions Summary: Add missing 8030875 changes in 8u Reviewed-by: mchung, kvn
author goetz
date Thu, 20 Feb 2014 15:03:10 +0100
parents 98b0dbc4bc08
children 366c03690390
files src/share/native/com/sun/java/util/jar/pack/coding.cpp src/share/native/com/sun/java/util/jar/pack/defines.h
diffstat 2 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/com/sun/java/util/jar/pack/coding.cpp	Thu Mar 13 15:33:43 2014 +0400
+++ b/src/share/native/com/sun/java/util/jar/pack/coding.cpp	Thu Feb 20 15:03:10 2014 +0100
@@ -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 @@
       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);
--- a/src/share/native/com/sun/java/util/jar/pack/defines.h	Thu Mar 13 15:33:43 2014 +0400
+++ b/src/share/native/com/sun/java/util/jar/pack/defines.h	Thu Feb 20 15:03:10 2014 +0100
@@ -158,10 +158,6 @@
 #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"