diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-08-03 12:57:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 12:57:29 (GMT) |
commit | 7fc8531b767855e69fb4016783a1131ba581fd5b (patch) | |
tree | a243310b99da59c858ae4eaeed8c452e0177bba4 /src/H5Groot.c | |
parent | a77d8bfcd7d066c6759b0346c02cbd612f90b7c2 (diff) | |
download | hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.zip hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.gz hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.bz2 |
Merge Made HGOTO_ERROR a do-while loop changes from develop (#3334)
Diffstat (limited to 'src/H5Groot.c')
-rw-r--r-- | src/H5Groot.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/H5Groot.c b/src/H5Groot.c index 8346fc4..7f5b956 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -144,16 +144,16 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) /* Create information needed for group nodes */ if (H5G__node_init(f) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info"); /* * Create the group pointer */ if (NULL == (f->shared->root_grp = H5FL_CALLOC(H5G_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (NULL == (f->shared->root_grp->shared = H5FL_CALLOC(H5G_shared_t))) { f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end if */ /* Initialize the root_loc structure to point to fields in the newly created @@ -172,14 +172,14 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) gcrt_info.gcpl_id = f->shared->fcpl_id; gcrt_info.cache_type = H5G_NOTHING_CACHED; if (H5G__obj_create(f, &gcrt_info, root_loc.oloc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry"); if (1 != H5O_link(root_loc.oloc, 1)) - HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)") + HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)"); /* Decrement refcount on root group's object header in memory */ if (H5O_dec_rc_by_loc(root_loc.oloc) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, - "unable to decrement refcount on root group's object header") + "unable to decrement refcount on root group's object header"); /* Mark superblock dirty, so root group info is flushed */ sblock_dirty = TRUE; @@ -189,7 +189,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { /* Allocate space for the root group symbol table entry */ if (NULL == (f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry"); /* Initialize the root group symbol table entry */ f->shared->sblock->root_ent->type = gcrt_info.cache_type; @@ -208,7 +208,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * Open the root object as a group. */ if (H5O_open(root_loc.oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group"); /* Actions to take if the symbol table information is cached */ if (f->shared->sblock->root_ent && f->shared->sblock->root_ent->type == H5G_CACHED_STAB) { @@ -216,7 +216,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * not exist. This can happen if, for example, an external link is * added to the root group. */ if ((stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists"); /* Remove the cache if the stab does not exist */ if (!stab_exists) @@ -234,7 +234,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) /* Check if the symbol table message is valid, and replace with the * cached symbol table if necessary */ if (H5G__stab_valid(root_loc.oloc, &cached_stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table"); } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ } /* end if */ @@ -253,12 +253,12 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * to use the latest version while the superblock is an old version. * If stab_exists is not -1 then we have already checked. */ if (stab_exists == -1 && (stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists"); if (stab_exists) { /* Read the root group's symbol table message */ if (NULL == H5O_msg_read(root_loc.oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message"); /* Update the root group symbol table entry */ f->shared->sblock->root_ent->type = H5G_CACHED_STAB; @@ -362,9 +362,9 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc) /* Build the group location for the root group */ if (NULL == (loc->oloc = H5G_oloc(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (loc->path = H5G_nameof(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Patch up root group's object location to reflect this file */ /* (Since the root group info is only stored once for files which |