summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-21 21:15:34 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:55 (GMT)
commitd6c2f9966fcb19ad5ee71ad81def39aa77b917b6 (patch)
tree0af6dc97641a82a2b1606a6297f278338d11da94
parent925d3e82bdf8792d8f5e032597f2a77e60984726 (diff)
downloadhdf5-d6c2f9966fcb19ad5ee71ad81def39aa77b917b6.zip
hdf5-d6c2f9966fcb19ad5ee71ad81def39aa77b917b6.tar.gz
hdf5-d6c2f9966fcb19ad5ee71ad81def39aa77b917b6.tar.bz2
Fix always true issue because member is not dynamically allocated
-rw-r--r--java/src/jni/h5pFAPLImp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c
index c9844b7..178b1af 100644
--- a/java/src/jni/h5pFAPLImp.c
+++ b/java/src/jni/h5pFAPLImp.c
@@ -395,7 +395,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
if (H5Pget_fapl_hdfs((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL != fa.namenode_name) {
+ if (HDstrlen(fa.namenode_name) > 0) {
if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string");
@@ -405,7 +405,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
args[1].i = (jint)fa.namenode_port;
- if (NULL != fa.user_name) {
+ if (HDstrlen(fa.user_name) > 0) {
if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string");
@@ -413,7 +413,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
}
args[2].l = j_user_name;
- if (NULL != fa.kerberos_ticket_cache) {
+ if (HDstrlen(fa.kerberos_ticket_cache) > 0) {
if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string");
@@ -820,7 +820,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
if (H5Pget_fapl_ros3((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL != fa.aws_region) {
+ if (HDstrlen(fa.aws_region) > 0) {
if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string");
@@ -828,7 +828,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
}
args[0].l = j_aws;
- if (NULL != fa.secret_id) {
+ if (HDstrlen(fa.secret_id) > 0) {
if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string");
@@ -836,7 +836,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
}
args[1].l = j_id;
- if (NULL != fa.secret_key) {
+ if (HDstrlen(fa.secret_key) > 0) {
if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string");
@@ -1685,7 +1685,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config
args[2].z = cacheinfo.open_trace_file;
args[3].z = cacheinfo.close_trace_file;
- if (NULL != cacheinfo.trace_file_name) {
+ if (HDstrlen(cacheinfo.trace_file_name) > 0) {
if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters");