diff options
Diffstat (limited to 'hl/src/H5LD.c')
-rw-r--r-- | hl/src/H5LD.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c index 90701b6..e618a66 100644 --- a/hl/src/H5LD.c +++ b/hl/src/H5LD.c @@ -148,10 +148,10 @@ done: int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid) { - int nfields; /* The # of comma-separated fields in "fields" */ - hbool_t end_of_fields = FALSE; /* end of "fields" */ - char *fields_ptr; /* Pointer to "fields" */ - int ret_value = FAIL; /* Return value */ + int nfields; /* The # of comma-separated fields in "fields" */ + bool end_of_fields = false; /* end of "fields" */ + char *fields_ptr; /* Pointer to "fields" */ + int ret_value = FAIL; /* Return value */ assert(listv); assert(fields); @@ -164,12 +164,12 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid) H5LD_memb_t *memb = NULL; /* Pointer to structure for storing a field's info */ char *cur; /* Pointer to a member in a field */ size_t len; /* Estimated # of members in a field */ - hbool_t gotcomma = FALSE; /* A comma encountered */ - hbool_t gotmember = FALSE; /* Getting member in a field */ - hbool_t valid = TRUE; /* Whether a field being processed is valid or not */ + bool gotcomma = false; /* A comma encountered */ + bool gotmember = false; /* Getting member in a field */ + bool valid = true; /* Whether a field being processed is valid or not */ int j = 0; /* The # of members in a field */ - len = (HDstrlen(fields_ptr) / 2) + 2; + len = (strlen(fields_ptr) / 2) + 2; /* Allocate memory for an H5LD_memb_t for storing a field's info */ if (NULL == (memb = (H5LD_memb_t *)calloc((size_t)1, sizeof(H5LD_memb_t)))) @@ -188,51 +188,48 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid) switch (*fields_ptr) { case '\0': /* end of list */ if (gotmember) { /* getting something and end of "fields" */ - *cur++ = '\0'; - ; + *cur++ = '\0'; memb->names[++j] = NULL; } /* end if */ else /* getting nothing but end of list */ - valid = FALSE; - end_of_fields = TRUE; + valid = false; + end_of_fields = true; break; case '\\': /* escape character */ ++fields_ptr; /* skip it */ if (*fields_ptr == '\0') - valid = FALSE; + valid = false; else { *cur++ = *fields_ptr++; - gotmember = TRUE; + gotmember = true; } /* end else */ break; case '.': /* nested field separator */ *fields_ptr++ = *cur++ = '\0'; - ; if (gotmember) { memb->names[++j] = cur; - gotmember = FALSE; + gotmember = false; } /* end if */ else - valid = FALSE; + valid = false; break; case ',': /* field separator */ *fields_ptr++ = *cur++ = '\0'; - ; if (gotmember) { memb->names[++j] = NULL; - gotmember = FALSE; + gotmember = false; } /* end if */ else - valid = FALSE; - gotcomma = TRUE; + valid = false; + gotcomma = true; break; default: *cur++ = *fields_ptr++; - gotmember = TRUE; + gotmember = true; break; } /* end switch */ } /* while (valid && !gotcomma && !end_of_fields) */ @@ -300,7 +297,7 @@ done: { H5Sclose(sid); } - H5E_END_TRY; + H5E_END_TRY return (ret_value); } /* H5LD_get_dset_dims() */ @@ -351,7 +348,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields) goto done; /* Allocate memory for a list of H5LD_memb_t pointers to store "fields" info */ - len = (HDstrlen(fields) / 2) + 2; + len = (strlen(fields) / 2) + 2; if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *)))) goto done; @@ -506,7 +503,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims goto done; /* Allocate memory for the vector of H5LD_memb_t pointers */ - len = (HDstrlen(fields) / 2) + 2; + len = (strlen(fields) / 2) + 2; if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *)))) goto done; |