Home
last modified time | relevance | path

Searched refs:NULL (Results 1 – 25 of 70) sorted by relevance

123

/libcore/luni/src/main/native/
Dlibcore_icu_NativeConverter.cpp96 const char* canonicalName = NULL; in getICUCanonicalName()
97 if ((canonicalName = ucnv_getCanonicalName(name, "MIME", &error)) != NULL) { in getICUCanonicalName()
99 } else if ((canonicalName = ucnv_getCanonicalName(name, "IANA", &error)) != NULL) { in getICUCanonicalName()
101 } else if ((canonicalName = ucnv_getCanonicalName(name, "", &error)) != NULL) { in getICUCanonicalName()
103 } else if ((canonicalName = ucnv_getAlias(name, 0, &error)) != NULL) { in getICUCanonicalName()
114 return NULL; in getICUCanonicalName()
128 const char* cName = NULL; in getJavaCanonicalName()
129 if ((cName = ucnv_getStandardName(icuCanonicalName, "MIME", &status)) != NULL) { in getJavaCanonicalName()
131 } else if ((cName = ucnv_getStandardName(icuCanonicalName, "IANA", &status)) != NULL) { in getJavaCanonicalName()
140 if (name != NULL && name[0] == 'x' && name[1] == '-') { in getJavaCanonicalName()
[all …]
Dorg_apache_harmony_xml_ExpatParser.cpp44 InternedString() : interned(NULL), bytes(NULL) { in InternedString()
77 if (newArray == NULL) { in push()
78 jniThrowOutOfMemoryError(env, NULL); in push()
92 return (size == 0) ? NULL : array[--size]; in pop()
108 : env(NULL), object(object), buffer(NULL), bufferSize(-1) { in ParsingContext()
110 internedStrings[i] = NULL; in ParsingContext()
123 while ((current = *(bucket++)) != NULL) { in ~ParsingContext()
144 if (javaBuffer == NULL) return NULL; in ensureCapacity()
148 if (javaBuffer == NULL) return NULL; in ensureCapacity()
158 if (buffer != NULL) { in freeBuffer()
[all …]
Dlibcore_io_Linux.cpp82 if ((NAME) == NULL) return NULL;
93 if (p != NULL) { // bionic's freeaddrinfo(3) crashes when passed NULL. in operator ()()
107 return sa != NULL && sa->sa_family == AF_INET6 && in isIPv4MappedAddress()
127 if ((java_addr) == NULL && (null_addr_ok)) { \
134 sockaddr* _sa = _salen ? reinterpret_cast<sockaddr*>(&_ss) : NULL; \
235 jthrowable cause = NULL; in throwException()
242 if (detailMessage.get() == NULL) { in throwException()
249 if (cause != NULL) { in throwException()
306 if (offsets.get() == NULL) { in init()
310 if (byteCounts.get() == NULL) { in init()
[all …]
DZipUtilities.cpp27 jniThrowOutOfMemoryError(env, NULL); in throwExceptionForZlibError()
28 } else if (stream != NULL && stream->stream.msg != NULL) { in throwExceptionForZlibError()
48 if (dictionaryBytes.get() == NULL) { in setDictionary()
49 jniThrowOutOfMemoryError(env, NULL); in setDictionary()
61 throwExceptionForZlibError(env, "java/lang/IllegalArgumentException", err, NULL); in setDictionary()
69 if (input.get() == NULL) { in setInput()
71 jniThrowOutOfMemoryError(env, NULL); in setInput()
75 if (buf != NULL) { in setInput()
DExecStrings.cpp28 : env_(env), java_array_(java_string_array), array_(NULL) { in ExecStrings()
29 if (java_array_ == NULL) { in ExecStrings()
35 array_[length] = NULL; in ExecStrings()
39 char* string = const_cast<char*>(env_->GetStringUTFChars(java_string.get(), NULL)); in ExecStrings()
45 if (array_ == NULL) { in ~ExecStrings()
51 if (pending_exception != NULL) { in ~ExecStrings()
63 if (pending_exception != NULL) { in ~ExecStrings()
DNetworkUtilities.cpp71 return NULL; in sockaddrToInetAddress()
73 if (port != NULL) { in sockaddrToInetAddress()
78 if (byteArray.get() == NULL) { in sockaddrToInetAddress()
79 return NULL; in sockaddrToInetAddress()
86 if (getByAddressMethod == NULL) { in sockaddrToInetAddress()
87 return NULL; in sockaddrToInetAddress()
90 NULL, byteArray.get(), scope_id); in sockaddrToInetAddress()
97 if (inetAddress == NULL) { in inetAddressToSockaddr()
98 jniThrowNullPointerException(env, NULL); in inetAddressToSockaddr()
104 if (holderFid == NULL) { in inetAddressToSockaddr()
[all …]
DScopedJavaUnicodeString.h29 if (s == NULL) { in ScopedJavaUnicodeString()
30 jniThrowNullPointerException(mEnv, NULL); in ScopedJavaUnicodeString()
32 mChars = env->GetStringChars(mString, NULL); in ScopedJavaUnicodeString()
39 if (mString != NULL) { in ~ScopedJavaUnicodeString()
45 return (mString != NULL); in valid()
DAsynchronousCloseMonitor.cpp61 static AsynchronousCloseMonitorImpl* blockedThreadList = NULL;
85 int rc = sigaction(BLOCKED_THREAD_SIGNAL, &sa, NULL); in init()
93 for (AsynchronousCloseMonitorImpl* it = blockedThreadList; it != NULL; it = it->mNext) { in signalBlockedThreads()
113 mPrev = NULL; in AsynchronousCloseMonitorImpl()
115 if (mNext != NULL) { in AsynchronousCloseMonitorImpl()
124 if (mNext != NULL) { in ~AsynchronousCloseMonitorImpl()
127 if (mPrev == NULL) { in ~AsynchronousCloseMonitorImpl()
Dlibcore_icu_ICU.cpp80 if (bundle_ != NULL) { in ~ScopedResourceBundle()
91 ures_getStringByKey(bundle_, key, NULL, &status); in hasKey()
114 return NULL; in ICU_getScript()
143 return NULL; in ICU_getCurrencyCode()
146 ScopedResourceBundle currencyMap(ures_getByKey(supplData.get(), "CurrencyMap", NULL, &status)); in ICU_getCurrencyCode()
148 return NULL; in ICU_getCurrencyCode()
152 …ScopedResourceBundle currency(ures_getByKey(currencyMap.get(), countryCode.c_str(), NULL, &status)… in ICU_getCurrencyCode()
154 return NULL; in ICU_getCurrencyCode()
157 ScopedResourceBundle currencyElem(ures_getByIndex(currency.get(), 0, NULL, &status)); in ICU_getCurrencyCode()
163 ScopedResourceBundle currencyTo(ures_getByKey(currencyElem.get(), "to", NULL, &status)); in ICU_getCurrencyCode()
[all …]
DIcuUtilities.cpp34 return NULL; in fromStringEnumeration()
39 return NULL; in fromStringEnumeration()
42 jobjectArray result = env->NewObjectArray(count, JniConstants::GetStringClass(env), NULL); in fromStringEnumeration()
46 return NULL; in fromStringEnumeration()
Djava_math_NativeBN.cpp152 if (chars.c_str() == NULL) { in NativeBN_BN_dec2bn()
166 if (chars.c_str() == NULL) { in NativeBN_BN_hex2bn()
180 if (bytes.get() == NULL) { in NativeBN_BN_bin2bn()
197 if (scopedArray.get() == NULL) { in NativeBN_litEndInts2bn()
218 if (bytes.get() == NULL) { in NativeBN_twosComp2bn()
279 if (!oneValidHandle(env, a)) return NULL; in NativeBN_BN_bn2dec()
281 if (tmpStr == NULL) { in NativeBN_BN_bn2dec()
283 return NULL; in NativeBN_BN_bn2dec()
292 if (!oneValidHandle(env, a)) return NULL; in NativeBN_BN_bn2hex()
294 if (tmpStr == NULL) { in NativeBN_BN_bn2hex()
[all …]
/libcore/ojluni/src/main/native/
DObjectInputStream.c69 if (src == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
70 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
73 bytes = (*env)->GetPrimitiveArrayCritical(env, src, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
74 if (bytes == NULL) /* exception thrown */ in Java_java_io_ObjectInputStream_bytesToFloats()
78 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
80 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
83 floats = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
84 if (floats == NULL) { /* exception thrown */ in Java_java_io_ObjectInputStream_bytesToFloats()
137 if (src == NULL) { in Java_java_io_ObjectInputStream_bytesToDoubles()
138 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToDoubles()
[all …]
DObjectOutputStream.c69 if (src == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
70 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
73 floats = (*env)->GetPrimitiveArrayCritical(env, src, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
74 if (floats == NULL) /* exception thrown */ in Java_java_io_ObjectOutputStream_floatsToBytes()
78 if (dst == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
80 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
83 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
84 if (bytes == NULL) { /* exception thrown */ in Java_java_io_ObjectOutputStream_floatsToBytes()
141 if (src == NULL) { in Java_java_io_ObjectOutputStream_doublesToBytes()
142 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_doublesToBytes()
[all …]
Dio_util.h91 if (_##var##str == NULL) { \
92 JNU_ThrowNullPointerException((env), NULL); \
95 var = JNU_GetStringPlatformChars((env), _##var##str, NULL); \
96 if (var == NULL) goto _##var##end;
100 ((object == NULL) \
101 ? NULL \
108 } else ((void)NULL)
119 if (_##var##str == NULL) { \
120 JNU_ThrowNullPointerException((env), NULL); \
123 var = (*(env))->GetStringChars((env), _##var##str, NULL); \
[all …]
DUNIXProcess_md.c207 if (sigaction(SIGCHLD, &sa, NULL) < 0) in setSIGCHLDHandler()
215 if (p == NULL) in xmalloc()
216 JNU_ThrowOutOfMemoryError(env, NULL); in xmalloc()
244 return (s != NULL) ? s : defaultPath(); in effectivePath()
265 pathv[count] = NULL; in splitPath()
443 if ((dp = opendir(FD_DIR)) == NULL) in closeDescriptors()
449 while ((dirp = readdir64(dp)) != NULL) { in closeDescriptors()
452 (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) in closeDescriptors()
475 return arr == NULL ? NULL : in getBytes()
476 (const char*) (*env)->GetByteArrayElements(env, arr, NULL); in getBytes()
[all …]
Dio_util.c54 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in readSingle()
82 char *buf = NULL; in readBytes()
86 JNU_ThrowNullPointerException(env, NULL); in readBytes()
91 JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL); in readBytes()
99 if (buf == NULL) { in readBytes()
100 JNU_ThrowOutOfMemoryError(env, NULL); in readBytes()
118 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in readBytes()
148 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in writeSingle()
158 char *buf = NULL; in writeBytes()
162 JNU_ThrowNullPointerException(env, NULL); in writeBytes()
[all …]
DSystem.c53 if ((*env)->ExceptionOccurred(env)) return NULL; \
67 if ((*env)->ExceptionOccurred(env)) return NULL; \
76 if ((*env)->ExceptionOccurred(env)) return NULL; \
84 if ((*env)->ExceptionOccurred(env)) return NULL; \
155 if (libname == NULL) { in System_mapLibraryName()
157 return NULL; in System_mapLibraryName()
162 return NULL; in System_mapLibraryName()
175 jobjectArray result = (*env)->NewObjectArray(env, 4, stringClass, NULL); in System_specialProperties()
183 return NULL; in System_specialProperties()
187 return NULL; in System_specialProperties()
[all …]
DProcessEnvironment_md.c60 if (strchr(environ[i], '=') != NULL) in ProcessEnvironment_environ()
65 if (result == NULL) return NULL; in ProcessEnvironment_environ()
70 if (varEnd != NULL) { in ProcessEnvironment_environ()
76 if (var == NULL) return NULL; in ProcessEnvironment_environ()
78 if (val == NULL) return NULL; in ProcessEnvironment_environ()
DLinuxNativeDispatcher.c44 fgetxattr_func* my_fgetxattr_func = NULL;
45 fsetxattr_func* my_fsetxattr_func = NULL;
46 fremovexattr_func* my_fremovexattr_func = NULL;
47 flistxattr_func* my_flistxattr_func = NULL;
57 if (x != NULL) { in throwUnixException()
90 if (my_fgetxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0()
109 if (my_fsetxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0()
126 if (my_fremovexattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0()
143 if (my_flistxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr()
158 FILE* fp = NULL; in Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0()
[all …]
Dzip_util.c124 NULL, /* Security attributes */ in ZFILE_Open()
127 NULL); in ZFILE_Open()
225 if (((zip = calloc(1, sizeof(jzfile))) != NULL) && in allocZip()
226 ((zip->name = strdup(name)) != NULL) && in allocZip()
227 ((zip->lock = MCREATE()) != NULL)) { in allocZip()
232 if (zip != NULL) { in allocZip()
236 return NULL; in allocZip()
247 if (zip->lock != NULL) MDESTROY(zip->lock); in freeZip()
253 if (zip->maddr != NULL) in freeZip()
260 if (zip->comment != NULL) in freeZip()
[all …]
DUnixNativeDispatcher.c87 } while((_result == NULL) && (errno == EINTR)); \
130 static openat64_func* my_openat64_func = NULL;
131 static fstatat64_func* my_fstatat64_func = NULL;
132 static unlinkat_func* my_unlinkat_func = NULL;
133 static renameat_func* my_renameat_func = NULL;
134 static futimesat_func* my_futimesat_func = NULL;
135 static fdopendir_func* my_fdopendir_func = NULL;
172 if (x != NULL) { in throwUnixException()
263 if (my_fstatat64_func == NULL) in Java_sun_nio_fs_UnixNativeDispatcher_init()
272 if (my_futimesat_func != NULL) in Java_sun_nio_fs_UnixNativeDispatcher_init()
[all …]
DObjectStreamClass.c39 if (cl == NULL) { /* exception thrown */ in ObjectStreamClass_initNative()
61 jclass superCl = NULL; in ObjectStreamClass_hasStaticInitializer()
62 jmethodID superClinitId = NULL; in ObjectStreamClass_hasStaticInitializer()
69 if (clinitId == NULL) { /* error thrown */ in ObjectStreamClass_hasStaticInitializer()
96 if ((superCl = (*env)->GetSuperclass(env, clazz)) == NULL) { in ObjectStreamClass_hasStaticInitializer()
101 if (superClinitId == NULL) { /* error thrown */ in ObjectStreamClass_hasStaticInitializer()
DUnixFileSystem_md.c87 jstring rv = NULL; in Java_java_io_UnixFileSystem_canonicalize0()
307 DIR *dir = NULL; in Java_java_io_UnixFileSystem_list0()
316 CHECK_NULL_RETURN(str_class, NULL); in Java_java_io_UnixFileSystem_list0()
322 if (dir == NULL) return NULL; in Java_java_io_UnixFileSystem_list0()
337 rv = (*env)->NewObjectArray(env, maxlen, str_class, NULL); in Java_java_io_UnixFileSystem_list0()
338 if (rv == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
343 while ((ptr = readdir64(dir)) != NULL) { in Java_java_io_UnixFileSystem_list0()
349 rv = (*env)->NewObjectArray(env, maxlen <<= 1, str_class, NULL); in Java_java_io_UnixFileSystem_list0()
350 if (rv == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
359 if (name == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
[all …]
DDatagramChannelImpl.c66 if (isa_class == NULL) { in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
67 JNU_ThrowOutOfMemoryError(env, NULL); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
199 (*env)->SetObjectField(env, this, dci_senderID, NULL); in Java_sun_nio_ch_DatagramChannelImpl_receive0()
209 if (senderAddr != NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
212 senderAddr = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
216 senderAddr = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
220 if (senderAddr == NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
221 jobject isa = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
228 if (ia != NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
Dnet_util_md.c75 getaddrinfo_f getaddrinfo_ptr = NULL;
76 freeaddrinfo_f freeaddrinfo_ptr = NULL;
77 gai_strerror_f gai_strerror_ptr = NULL;
78 getnameinfo_f getnameinfo_ptr = NULL;
95 static jclass ni_class = NULL;
97 if (ni_class == NULL) {
117 static jclass ni_class = NULL;
119 if (ni_class == NULL) {
121 if (c == NULL) return 0;
123 if (c == NULL) return 0;
[all …]

123