summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-08-28 18:32:01 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-08-28 18:32:01 (GMT)
commitd8ec4df92880d98907b12af8fc9fff86e0631270 (patch)
treec2ed10db6ddf23bc4f366260cdf5cf7663ae47be /java/src
parentebc3d3eda5b9e5c3090322e19898e47141efeadd (diff)
downloadhdf5-d8ec4df92880d98907b12af8fc9fff86e0631270.zip
hdf5-d8ec4df92880d98907b12af8fc9fff86e0631270.tar.gz
hdf5-d8ec4df92880d98907b12af8fc9fff86e0631270.tar.bz2
Update system commands with HD prefix and whitespace
Diffstat (limited to 'java/src')
-rw-r--r--java/src/jni/h5dImp.c2
-rw-r--r--java/src/jni/h5pImp.c4
-rw-r--r--java/src/jni/h5sImp.c6
-rw-r--r--java/src/jni/h5util.c10
4 files changed, 11 insertions, 11 deletions
diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c
index f984948..652c873 100644
--- a/java/src/jni/h5dImp.c
+++ b/java/src/jni/h5dImp.c
@@ -1109,7 +1109,7 @@ Java_hdf_hdf5lib_H5_H5Dwrite_1string
const char *utf8 = ENVPTR->GetStringUTFChars(ENVPAR obj, 0);
if (utf8) {
- strncpy(&c_buf[i * str_len], utf8, str_len);
+ HDstrncpy(&c_buf[i * str_len], utf8, str_len);
} /* end if */
ENVPTR->ReleaseStringUTFChars(ENVPAR obj, utf8);
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index e6d1be8..52008ce 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -3881,7 +3881,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1multi
const char *utf8 = ENVPTR->GetStringUTFChars(ENVPAR obj, 0);
if (utf8) {
- member_name[i] = (char*)HDmalloc(strlen(utf8) + 1);
+ member_name[i] = (char*)HDmalloc(HDstrlen(utf8) + 1);
if (member_name[i]) {
strcpy(member_name[i], utf8);
} /* end if */
@@ -4189,7 +4189,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1mdc_1config
h5JNIFatalError(env, "H5Pset_mdc_config: out of memory trace_file_name");
return;
} /* end if */
- strncpy(cacheinfo.trace_file_name, str, 1025);
+ HDstrncpy(cacheinfo.trace_file_name, str, 1025);
ENVPTR->ReleaseStringUTFChars(ENVPAR j_str, str);
if(ENVPTR->ExceptionOccurred(ENVONLY)) {
h5JNIFatalError(env, "H5Pset_mdc_config: loading trace_file_name failed");
diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c
index a4b4848..65cdd7b 100644
--- a/java/src/jni/h5sImp.c
+++ b/java/src/jni/h5sImp.c
@@ -571,7 +571,7 @@ Java_hdf_hdf5lib_H5_H5Sset_1extent_1simple
h5JNIFatalError(env, "H5Pset_simple_extent: dims not pinned");
return -1;
} /* end if */
- sa = lp = (hsize_t *) malloc((size_t)rank * sizeof(hsize_t));
+ sa = lp = (hsize_t *) HDmalloc((size_t)rank * sizeof(hsize_t));
if (sa == NULL) {
ENVPTR->ReleaseLongArrayElements(ENVPAR dims, dimsP, JNI_ABORT);
h5JNIFatalError(env, "H5Sset_simple_extent: dims not converted to hsize_t");
@@ -1017,7 +1017,7 @@ Java_hdf_hdf5lib_H5_H5Sget_1select_1hyper_1blocklist
h5JNIFatalError(env, "H5Sget_select_hyper_blocklist: buf not pinned");
} /* end if */
else {
- ba = (hsize_t *) malloc((size_t)nb * 2 * (size_t)rank * sizeof(hsize_t));
+ ba = (hsize_t *) HDmalloc((size_t)nb * 2 * (size_t)rank * sizeof(hsize_t));
if (ba == NULL) {
ENVPTR->ReleaseLongArrayElements(ENVPAR buf, bufP, JNI_ABORT);
h5JNIFatalError(env, "H5Screate-simple: buffer not converted to hsize_t");
@@ -1135,7 +1135,7 @@ Java_hdf_hdf5lib_H5_H5Sget_1select_1bounds
return -1;
} /* end if */
rank = (int) ENVPTR->GetArrayLength(ENVPAR start);
- strt = (hsize_t *)malloc((size_t)rank * sizeof(hsize_t));
+ strt = (hsize_t *)HDmalloc((size_t)rank * sizeof(hsize_t));
if (strt == NULL) {
ENVPTR->ReleaseLongArrayElements(ENVPAR start, startP, JNI_ABORT);
h5JNIFatalError(env, "H5Sget_select_bounds: start not converted to hsize_t");
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 42f8a5c..fd34ba1 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -1768,7 +1768,7 @@ h5str_render_bin_output
if (H5Tis_variable_str(tid)) {
s = *(char**) mem;
if (s != NULL)
- size = strlen(s);
+ size = HDstrlen(s);
}
else {
s = (char *) mem;
@@ -2129,11 +2129,11 @@ render_bin_output_region_data_points
ret_value = -1;
HDfree(dims1);
- } /* end if((dims1 = (hsize_t *) malloc(sizeof(hsize_t) * ndims)) != NULL) */
+ } /* end if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) != NULL) */
else
ret_value = -1;
HDfree(region_buf);
- } /* end if((region_buf = malloc(type_size * (size_t)npoints)) != NULL) */
+ } /* end if((region_buf = HDmalloc(type_size * (size_t)npoints)) != NULL) */
else
ret_value = -1;
@@ -2436,7 +2436,7 @@ Java_hdf_hdf5lib_H5_H5AreadComplex
H5Tclose(p_type);
n = ENVPTR->GetArrayLength(ENVPAR buf);
- rdata = (char *)malloc((size_t)n * size);
+ rdata = (char *)HDmalloc((size_t)n * size);
if (rdata == NULL) {
h5JNIFatalError(env, "H5AreadComplex: failed to allocate buff for read");
} /* end if */
@@ -2952,7 +2952,7 @@ obj_info_all
if (retVal < 0) {
*(datainfo->otype+datainfo->count) = -1;
*(datainfo->ltype+datainfo->count) = -1;
- *(datainfo->objname+datainfo->count) = (char *)HDmalloc(strlen(name)+1);
+ *(datainfo->objname+datainfo->count) = (char *)HDmalloc(HDstrlen(name)+1);
HDstrcpy(*(datainfo->objname+datainfo->count), name);
*(datainfo->objno+datainfo->count) = (unsigned long)-1;
} /* end if */