summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-10 17:58:20 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-10 17:58:20 (GMT)
commit79a2e34f88af7c7290401607f1dd1fed822dc414 (patch)
tree442bcb106378ce41f4ace3f0771c7bc6f8557022
parent5f6eec0b20ce325fbd4cbc7913cd972fbd070a22 (diff)
downloadhdf5-79a2e34f88af7c7290401607f1dd1fed822dc414.zip
hdf5-79a2e34f88af7c7290401607f1dd1fed822dc414.tar.gz
hdf5-79a2e34f88af7c7290401607f1dd1fed822dc414.tar.bz2
Correct typos w/HGOTO_DONE & HGOTO_ERROR
-rw-r--r--src/H5FDros3.c40
-rw-r--r--src/H5FDs3comms.c30
-rw-r--r--src/H5HLcache.c6
-rw-r--r--src/H5I.c6
-rw-r--r--src/H5Odtype.c10
-rw-r--r--src/H5Ostab.c2
-rw-r--r--src/H5Tenum.c3
7 files changed, 47 insertions, 50 deletions
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 38e34a0..c024716 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -1202,71 +1202,71 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* URL: SCHEME */
if(HDstrcmp(purl1->scheme, purl2->scheme))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* URL: HOST */
if(HDstrcmp(purl1->host, purl2->host))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* URL: PORT */
if(purl1->port && purl2->port) {
if(HDstrcmp(purl1->port, purl2->port))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(purl1->port)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(purl2->port)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* URL: PATH */
if(purl1->path && purl2->path) {
if(HDstrcmp(purl1->path, purl2->path))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(purl1->path && !purl2->path)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(purl2->path && !purl1->path)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* URL: QUERY */
if(purl1->query && purl2->query) {
if(HDstrcmp(purl1->query, purl2->query))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(purl1->query && !purl2->query)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(purl2->query && !purl1->query)
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* FAPL: AWS_REGION */
if(f1->fa.aws_region[0] != '\0' && f2->fa.aws_region[0] != '\0') {
if(HDstrcmp(f1->fa.aws_region, f2->fa.aws_region))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(f1->fa.aws_region[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(f2->fa.aws_region[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* FAPL: SECRET_ID */
if(f1->fa.secret_id[0] != '\0' && f2->fa.secret_id[0] != '\0') {
if(HDstrcmp(f1->fa.secret_id, f2->fa.secret_id))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(f1->fa.secret_id[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(f2->fa.secret_id[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
/* FAPL: SECRET_KEY */
if(f1->fa.secret_key[0] != '\0' && f2->fa.secret_key[0] != '\0') {
if(HDstrcmp(f1->fa.secret_key, f2->fa.secret_key))
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
}
else if(f1->fa.secret_key[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
else if(f2->fa.secret_key[0] != '\0')
- HGOTO_DONE(-1);
+ HGOTO_DONE(-1)
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index e79ee0d..4c762d1 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -311,7 +311,7 @@ H5FD_s3comms_hrb_node_set(
if(*L == NULL) {
if(value == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list")
else {
#if S3COMMS_DEBUG
HDprintf("CREATE NEW\n"); HDfflush(stdout);
@@ -414,7 +414,7 @@ HDprintf("MODIFY HEAD\n"); HDfflush(stdout);
is_looking = FALSE;
if(value == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head")
else {
#if S3COMMS_DEBUG
HDprintf("PREPEND NEW HEAD\n"); HDfflush(stdout);
@@ -442,7 +442,7 @@ HDprintf("PREPEND NEW HEAD\n"); HDfflush(stdout);
is_looking = FALSE;
if(value == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
HDprintf("APPEND A NODE\n"); HDfflush(stdout);
@@ -465,7 +465,7 @@ HDprintf("APPEND A NODE\n"); HDfflush(stdout);
is_looking = FALSE;
if(value == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
HDprintf("INSERT A NODE\n"); HDfflush(stdout);
@@ -944,9 +944,9 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem in reading during getsize.");
if(sds.size > CURL_MAX_HTTP_HEADER)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun")
else if (sds.size == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata")
#if S3COMMS_DEBUG
else
HDfprintf(stderr, "GETSIZE: OK\n");
@@ -2305,7 +2305,7 @@ H5FD_s3comms_parse_url(
purl->scheme = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if(purl->scheme == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for SCHEME");
- (void)HDstrncpy(purl->scheme, curstr, (size_t)len);
+ HDstrncpy(purl->scheme, curstr, (size_t)len);
purl->scheme[len] = '\0';
for(i = 0; i < len; i++ )
purl->scheme[i] = (char)HDtolower(purl->scheme[i]);
@@ -2337,7 +2337,7 @@ H5FD_s3comms_parse_url(
} /* end else (IPv4) */
len = tmpstr - curstr;
if(len == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty")
else if(len > urllen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of HOST substring");
@@ -2345,7 +2345,7 @@ H5FD_s3comms_parse_url(
purl->host = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if(purl->host == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for HOST");
- (void)HDstrncpy(purl->host, curstr, (size_t)len);
+ HDstrncpy(purl->host, curstr, (size_t)len);
purl->host[len] = 0;
/*************
@@ -2359,7 +2359,7 @@ H5FD_s3comms_parse_url(
tmpstr++;
len = tmpstr - curstr;
if(len == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty")
else if(len > urllen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PORT substring");
for(i = 0; i < len; i ++)
@@ -2370,7 +2370,7 @@ H5FD_s3comms_parse_url(
purl->port = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if(purl->port == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PORT");
- (void)HDstrncpy(purl->port, curstr, (size_t)len);
+ HDstrncpy(purl->port, curstr, (size_t)len);
purl->port[len] = 0;
} /* end if PORT element */
@@ -2392,8 +2392,8 @@ H5FD_s3comms_parse_url(
if(len > 0) {
purl->path = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if(purl->path == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH");
- (void)HDstrncpy(purl->path, curstr, (size_t)len);
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH");
+ HDstrncpy(purl->path, curstr, (size_t)len);
purl->path[len] = 0;
}
} /* end if PATH element */
@@ -2409,13 +2409,13 @@ H5FD_s3comms_parse_url(
tmpstr++;
len = tmpstr - curstr;
if(len == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty")
else if(len > urllen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of QUERY substring");
purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if(purl->query == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for QUERY");
- (void)HDstrncpy(purl->query, curstr, (size_t)len);
+ HDstrncpy(purl->query, curstr, (size_t)len);
purl->query[len] = 0;
} /* end if QUERY exists */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 38cf060..006ddc0 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -486,11 +486,11 @@ done:
if(!ret_value) {
if(prfx) {
if(FAIL == H5HL__prfx_dest(prfx))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap prefix");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap prefix");
} /* end if */
else {
if(heap && FAIL == H5HL__dest(heap))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap");
} /* end else */
} /* end if */
@@ -771,7 +771,7 @@ done:
/* Release the [possibly partially initialized] local heap on errors */
if(!ret_value && dblk)
if(FAIL == H5HL__dblk_dest(dblk))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL__cache_datablock_deserialize() */
diff --git a/src/H5I.c b/src/H5I.c
index a739c4e..c1d966c 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -1124,9 +1124,8 @@ H5I_is_file_object(hid_t id)
/* Return TRUE if the ID is a file object (dataset, group, map, or committed
* datatype), FALSE otherwise.
*/
- if (H5I_DATASET == id_type || H5I_GROUP == id_type || H5I_MAP == id_type) {
+ if (H5I_DATASET == id_type || H5I_GROUP == id_type || H5I_MAP == id_type)
ret_value = TRUE;
- }
else if (H5I_DATATYPE == id_type) {
H5T_t *dt = NULL;
@@ -1136,9 +1135,8 @@ H5I_is_file_object(hid_t id)
ret_value = H5T_is_named(dt);
}
- else {
+ else
ret_value = FALSE;
- }
done:
FUNC_LEAVE_NOAPI(ret_value);
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index cbadfd0..3ad53a4 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -439,15 +439,15 @@ H5O__dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t
/* Set reference type */
dt->shared->u.atomic.u.r.rtype = (H5R_type_t)(flags & 0x0f);
if(dt->shared->u.atomic.u.r.rtype <= H5R_BADTYPE
- || dt->shared->u.atomic.u.r.rtype >= H5R_MAXTYPE)
+ || dt->shared->u.atomic.u.r.rtype >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "invalid reference type");
/* Set generic flag */
if(dt->shared->u.atomic.u.r.rtype == H5R_OBJECT2
- || dt->shared->u.atomic.u.r.rtype == H5R_DATASET_REGION2
- || dt->shared->u.atomic.u.r.rtype == H5R_ATTR) {
- dt->shared->u.atomic.u.r.opaque = TRUE;
- dt->shared->u.atomic.u.r.version = (unsigned)((flags >> 4) & 0x0f);
+ || dt->shared->u.atomic.u.r.rtype == H5R_DATASET_REGION2
+ || dt->shared->u.atomic.u.r.rtype == H5R_ATTR) {
+ dt->shared->u.atomic.u.r.opaque = TRUE;
+ dt->shared->u.atomic.u.r.version = (unsigned)((flags >> 4) & 0x0f);
if(dt->shared->u.atomic.u.r.version != H5R_ENCODE_VERSION)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "reference version does not match");
} else
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 10501a0..18f32b3 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -185,7 +185,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
/* check args */
HDassert(stab);
if(!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* copy */
*dest = *stab;
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index ffdab5b..cd41a23 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -414,8 +414,7 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t s
/* Save result name */
if(!name) {
- if(NULL == (name = (char *)H5MM_malloc(
- HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
+ if(NULL == (name = (char *)H5MM_malloc(HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
alloc_name = TRUE;
} /* end if */